@@ -2936,12 +2936,14 @@ pp$5.parseExprImport = function(forNew) {
29362936 // Consume `import` as an identifier for `import.meta`.
29372937 // Because `this.parseIdent(true)` doesn't check escape sequences, it needs the check of `this.containsEsc`.
29382938 if ( this . containsEsc ) { this . raiseRecoverable ( this . start , "Escape sequence in keyword import" ) ; }
2939- var meta = this . parseIdent ( true ) ;
2939+ this . next ( ) ;
29402940
29412941 if ( this . type === types$1 . parenL && ! forNew ) {
29422942 return this . parseDynamicImport ( node )
29432943 } else if ( this . type === types$1 . dot ) {
2944- node . meta = meta ;
2944+ var meta = this . startNodeAt ( node . start , node . loc && node . loc . start ) ;
2945+ meta . name = "import" ;
2946+ node . meta = this . finishNode ( meta , "Identifier" ) ;
29452947 return this . parseImportMeta ( node )
29462948 } else {
29472949 this . unexpected ( ) ;
@@ -3091,7 +3093,7 @@ pp$5.parseNew = function() {
30913093 var node = this . startNode ( ) ;
30923094 this . next ( ) ;
30933095 if ( this . options . ecmaVersion >= 6 && this . type === types$1 . dot ) {
3094- var meta = this . startNodeAt ( node . start , node . startLoc ) ;
3096+ var meta = this . startNodeAt ( node . start , node . loc && node . loc . start ) ;
30953097 meta . name = "new" ;
30963098 node . meta = this . finishNode ( meta , "Identifier" ) ;
30973099 this . next ( ) ;
@@ -5919,7 +5921,7 @@ pp.readWord = function() {
59195921// [walk]: util/walk.js
59205922
59215923
5922- var version = "8.11.2 " ;
5924+ var version = "8.11.3 " ;
59235925
59245926Parser . acorn = {
59255927 Parser : Parser ,
@@ -5944,11 +5946,10 @@ Parser.acorn = {
59445946} ;
59455947
59465948// The main exported interface (under `self.acorn` when in the
5947- // browser) is a `parse` function that takes a code string and
5948- // returns an abstract syntax tree as specified by [Mozilla parser
5949- // API][api].
5949+ // browser) is a `parse` function that takes a code string and returns
5950+ // an abstract syntax tree as specified by the [ESTree spec][estree].
59505951//
5951- // [api ]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API
5952+ // [estree ]: https://github.com/estree/estree
59525953
59535954function parse ( input , options ) {
59545955 return Parser . parse ( input , options )
0 commit comments