Make the loose parser's parseIdent actually returns an identifier with a name
This commit is contained in:
parent
0fee7a395e
commit
685b51e0ae
@ -399,9 +399,10 @@ lp.parsePropertyAccessor = function() {
|
||||
}
|
||||
|
||||
lp.parseIdent = function() {
|
||||
let name = this.tok.type === tt.name ? this.tok.value : this.tok.type.keyword
|
||||
if (!name) return this.dummyIdent()
|
||||
let node = this.startNode()
|
||||
node.name = this.tok.type === tt.name ? this.tok.value : this.tok.type.keyword
|
||||
this.next()
|
||||
node.name = name
|
||||
return this.finishNode(node, "Identifier")
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user