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

90 lines
3.4 KiB
JSON

{
"type": "File",
"start":0,"end":26,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":26}},
"errors": [
"SyntaxError: Unexpected trailing comma after rest element (1:16)"
],
"program": {
"type": "Program",
"start":0,"end":26,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":26}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "VariableDeclaration",
"start":0,"end":26,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":26}},
"declarations": [
{
"type": "VariableDeclarator",
"start":4,"end":25,"loc":{"start":{"line":1,"column":4},"end":{"line":1,"column":25}},
"id": {
"type": "ObjectPattern",
"start":4,"end":19,"loc":{"start":{"line":1,"column":4},"end":{"line":1,"column":19}},
"properties": [
{
"type": "ObjectProperty",
"start":6,"end":7,"loc":{"start":{"line":1,"column":6},"end":{"line":1,"column":7}},
"method": false,
"key": {
"type": "Identifier",
"start":6,"end":7,"loc":{"start":{"line":1,"column":6},"end":{"line":1,"column":7},"identifierName":"x"},
"name": "x"
},
"computed": false,
"shorthand": true,
"value": {
"type": "Identifier",
"start":6,"end":7,"loc":{"start":{"line":1,"column":6},"end":{"line":1,"column":7},"identifierName":"x"},
"name": "x"
},
"extra": {
"shorthand": true
}
},
{
"type": "ObjectProperty",
"start":9,"end":10,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":10}},
"method": false,
"key": {
"type": "Identifier",
"start":9,"end":10,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":10},"identifierName":"y"},
"name": "y"
},
"computed": false,
"shorthand": true,
"value": {
"type": "Identifier",
"start":9,"end":10,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":10},"identifierName":"y"},
"name": "y"
},
"extra": {
"shorthand": true
}
},
{
"type": "RestElement",
"start":12,"end":16,"loc":{"start":{"line":1,"column":12},"end":{"line":1,"column":16}},
"argument": {
"type": "Identifier",
"start":15,"end":16,"loc":{"start":{"line":1,"column":15},"end":{"line":1,"column":16},"identifierName":"z"},
"name": "z"
}
}
],
"extra": {
"trailingComma": 16
}
},
"init": {
"type": "Identifier",
"start":22,"end":25,"loc":{"start":{"line":1,"column":22},"end":{"line":1,"column":25},"identifierName":"obj"},
"name": "obj"
}
}
],
"kind": "let"
}
],
"directives": []
}
}