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":23,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":23}},
"errors": [
"SyntaxError: Unexpected reserved word 'enum' (1:8)"
],
"program": {
"type": "Program",
"start":0,"end":23,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":23}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "VariableDeclaration",
"start":0,"end":23,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":23}},
"declarations": [
{
"type": "VariableDeclarator",
"start":6,"end":22,"loc":{"start":{"line":1,"column":6},"end":{"line":1,"column":22}},
"id": {
"type": "ObjectPattern",
"start":6,"end":14,"loc":{"start":{"line":1,"column":6},"end":{"line":1,"column":14}},
"properties": [
{
"type": "ObjectProperty",
"start":8,"end":12,"loc":{"start":{"line":1,"column":8},"end":{"line":1,"column":12}},
"method": false,
"key": {
"type": "Identifier",
"start":8,"end":12,"loc":{"start":{"line":1,"column":8},"end":{"line":1,"column":12},"identifierName":"enum"},
"name": "enum"
},
"computed": false,
"shorthand": true,
"value": {
"type": "Identifier",
"start":8,"end":12,"loc":{"start":{"line":1,"column":8},"end":{"line":1,"column":12},"identifierName":"enum"},
"name": "enum"
},
"extra": {
"shorthand": true
}
}
]
},
"init": {
"type": "CallExpression",
"start":17,"end":22,"loc":{"start":{"line":1,"column":17},"end":{"line":1,"column":22}},
"callee": {
"type": "Identifier",
"start":17,"end":20,"loc":{"start":{"line":1,"column":17},"end":{"line":1,"column":20},"identifierName":"foo"},
"name": "foo"
},
"arguments": []
}
}
],
"kind": "const"
}
],
"directives": []
}
}