Skip to content

Commit

Permalink
refactor: remove unreachable code
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Jan 1, 2020
1 parent daaa206 commit e65c78c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/babel-parser/src/parser/expression.js
Expand Up @@ -904,6 +904,8 @@ export default class ExpressionParser extends LValParser {
return this.finishNode(node, "Super");

case tt._import:
// this.state.type can only be tt.dot or tt.parenL
// otherwise it would be parsed in parseStatementContent
node = this.startNode();
this.next();

Expand All @@ -913,9 +915,6 @@ export default class ExpressionParser extends LValParser {

this.expectPlugin("dynamicImport", node.start);

if (!this.match(tt.parenL)) {
this.unexpected(null, tt.parenL);
}
return this.finishNode(node, "Import");
case tt._this:
node = this.startNode();
Expand Down

0 comments on commit e65c78c

Please sign in to comment.