* refactor: avoid duplicate property access * refactor: tweak parseMember * polish: recover from shorthand assign in exprs
67 lines
2.6 KiB
JSON
67 lines
2.6 KiB
JSON
{
|
|
"type": "File",
|
|
"start":0,"end":29,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":29}},
|
|
"errors": [
|
|
"SyntaxError: Invalid shorthand property initializer. (1:20)"
|
|
],
|
|
"program": {
|
|
"type": "Program",
|
|
"start":0,"end":29,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":29}},
|
|
"sourceType": "script",
|
|
"interpreter": null,
|
|
"body": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"start":0,"end":29,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":29}},
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"start":6,"end":28,"loc":{"start":{"line":1,"column":6},"end":{"line":1,"column":28}},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"start":6,"end":9,"loc":{"start":{"line":1,"column":6},"end":{"line":1,"column":9},"identifierName":"foo"},
|
|
"name": "foo"
|
|
},
|
|
"init": {
|
|
"type": "ObjectExpression",
|
|
"start":12,"end":28,"loc":{"start":{"line":1,"column":12},"end":{"line":1,"column":28}},
|
|
"properties": [
|
|
{
|
|
"type": "ObjectProperty",
|
|
"start":14,"end":26,"loc":{"start":{"line":1,"column":14},"end":{"line":1,"column":26}},
|
|
"method": false,
|
|
"key": {
|
|
"type": "Identifier",
|
|
"start":14,"end":19,"loc":{"start":{"line":1,"column":14},"end":{"line":1,"column":19},"identifierName":"async"},
|
|
"name": "async"
|
|
},
|
|
"computed": false,
|
|
"shorthand": true,
|
|
"value": {
|
|
"type": "AssignmentPattern",
|
|
"start":14,"end":26,"loc":{"start":{"line":1,"column":14},"end":{"line":1,"column":26}},
|
|
"left": {
|
|
"type": "Identifier",
|
|
"start":14,"end":19,"loc":{"start":{"line":1,"column":14},"end":{"line":1,"column":19},"identifierName":"async"},
|
|
"name": "async"
|
|
},
|
|
"right": {
|
|
"type": "BooleanLiteral",
|
|
"start":22,"end":26,"loc":{"start":{"line":1,"column":22},"end":{"line":1,"column":26}},
|
|
"value": true
|
|
}
|
|
},
|
|
"extra": {
|
|
"shorthand": true
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"kind": "const"
|
|
}
|
|
],
|
|
"directives": []
|
|
}
|
|
} |