File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -240,7 +240,7 @@ protected Expression parseExprAtom(DestructuringErrors refDestructuringErrors) {
240240 if (this .type == TokenType ._import ) {
241241 Position startLoc = this .startLoc ;
242242 this .next ();
243- if (this .type == TokenType .dot ) {
243+ if (this .eat ( TokenType .dot ) ) {
244244 return parseImportMeta (startLoc );
245245 }
246246 this .expect (TokenType .parenL );
@@ -417,17 +417,16 @@ protected Statement parseImport(Position startLoc) {
417417 }
418418
419419 /**
420- * Parses an import.meta expression, assuming that the initial "import" has been consumed.
420+ * Parses an import.meta expression, assuming that the initial "import" and "." has been consumed.
421421 */
422422 private MetaProperty parseImportMeta (Position loc ) {
423- Identifier meta = new Identifier (new SourceLocation (loc ), "import" );
424- this .next ();
423+ Identifier importIdentifier = new Identifier (new SourceLocation (loc ), "import" );
425424 Position propertyLoc = this .startLoc ;
426425 Identifier property = this .parseIdent (true );
427426 if (!property .getName ().equals ("meta" )) {
428427 this .unexpected (propertyLoc );
429428 }
430- return this .finishNode (new MetaProperty (new SourceLocation (loc ), meta , property ));
429+ return this .finishNode (new MetaProperty (new SourceLocation (loc ), importIdentifier , property ));
431430 }
432431
433432 /**
You can’t perform that action at this time.
0 commit comments