Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Sep 20, 2022
1 parent b6d769e commit a81f8bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/babel-parser/src/parser/statement.ts
Expand Up @@ -2653,7 +2653,7 @@ export default abstract class StatementParser extends ExpressionParser {

parseMaybeImportReflection(node: Undone<N.ImportDeclaration>) {
let isImportReflection = false;
if (this.match(tt._module) && !this.state.containsEsc) {
if (this.isContextual(tt._module)) {
const lookahead = this.lookahead();
if (tokenIsIdentifier(lookahead.type)) {
if (lookahead.type !== tt._from) {
Expand All @@ -2671,7 +2671,7 @@ export default abstract class StatementParser extends ExpressionParser {
} else {
// import module { x } ...
// This is invalid, we will continue parsing and throw
// recoverable errors later
// a recoverable error later
isImportReflection = true;
}
}
Expand Down

0 comments on commit a81f8bc

Please sign in to comment.