Huáng Jùnliàng dc7c5640e9
Compact parser fixture loc info (#11322)
* chore: compact loc information in parser fixtures

* chore: update test fixtures
2020-03-23 20:10:29 -04:00

63 lines
2.3 KiB
JSON

{
"type": "File",
"start":0,"end":24,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":24}},
"errors": [
"SyntaxError: Can not use keyword 'await' outside an async function (1:8)"
],
"program": {
"type": "Program",
"start":0,"end":24,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":24}},
"sourceType": "module",
"interpreter": null,
"body": [
{
"type": "VariableDeclaration",
"start":0,"end":24,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":24}},
"declarations": [
{
"type": "VariableDeclarator",
"start":6,"end":23,"loc":{"start":{"line":1,"column":6},"end":{"line":1,"column":23}},
"id": {
"type": "ObjectPattern",
"start":6,"end":15,"loc":{"start":{"line":1,"column":6},"end":{"line":1,"column":15}},
"properties": [
{
"type": "ObjectProperty",
"start":8,"end":13,"loc":{"start":{"line":1,"column":8},"end":{"line":1,"column":13}},
"method": false,
"key": {
"type": "Identifier",
"start":8,"end":13,"loc":{"start":{"line":1,"column":8},"end":{"line":1,"column":13},"identifierName":"await"},
"name": "await"
},
"computed": false,
"shorthand": true,
"value": {
"type": "Identifier",
"start":8,"end":13,"loc":{"start":{"line":1,"column":8},"end":{"line":1,"column":13},"identifierName":"await"},
"name": "await"
},
"extra": {
"shorthand": true
}
}
]
},
"init": {
"type": "CallExpression",
"start":18,"end":23,"loc":{"start":{"line":1,"column":18},"end":{"line":1,"column":23}},
"callee": {
"type": "Identifier",
"start":18,"end":21,"loc":{"start":{"line":1,"column":18},"end":{"line":1,"column":21},"identifierName":"foo"},
"name": "foo"
},
"arguments": []
}
}
],
"kind": "const"
}
],
"directives": []
}
}