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

98 lines
3.8 KiB
JSON

{
"type": "File",
"start":0,"end":54,"loc":{"start":{"line":1,"column":0},"end":{"line":2,"column":28}},
"errors": [
"SyntaxError: Identifier 'foo' has already been declared (2:15)",
"SyntaxError: `foo` has already been exported. Exported identifiers must be unique. (2:15)"
],
"program": {
"type": "Program",
"start":0,"end":54,"loc":{"start":{"line":1,"column":0},"end":{"line":2,"column":28}},
"sourceType": "module",
"interpreter": null,
"body": [
{
"type": "ExportNamedDeclaration",
"start":0,"end":25,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":25}},
"specifiers": [],
"source": null,
"declaration": {
"type": "VariableDeclaration",
"start":7,"end":25,"loc":{"start":{"line":1,"column":7},"end":{"line":1,"column":25}},
"declarations": [
{
"type": "VariableDeclarator",
"start":13,"end":24,"loc":{"start":{"line":1,"column":13},"end":{"line":1,"column":24}},
"id": {
"type": "ArrayPattern",
"start":13,"end":18,"loc":{"start":{"line":1,"column":13},"end":{"line":1,"column":18}},
"elements": [
{
"type": "Identifier",
"start":14,"end":17,"loc":{"start":{"line":1,"column":14},"end":{"line":1,"column":17},"identifierName":"foo"},
"name": "foo"
}
]
},
"init": {
"type": "Identifier",
"start":21,"end":24,"loc":{"start":{"line":1,"column":21},"end":{"line":1,"column":24},"identifierName":"bar"},
"name": "bar"
}
}
],
"kind": "const"
}
},
{
"type": "ExportNamedDeclaration",
"start":26,"end":54,"loc":{"start":{"line":2,"column":0},"end":{"line":2,"column":28}},
"specifiers": [],
"source": null,
"declaration": {
"type": "VariableDeclaration",
"start":33,"end":54,"loc":{"start":{"line":2,"column":7},"end":{"line":2,"column":28}},
"declarations": [
{
"type": "VariableDeclarator",
"start":39,"end":53,"loc":{"start":{"line":2,"column":13},"end":{"line":2,"column":27}},
"id": {
"type": "ObjectPattern",
"start":39,"end":46,"loc":{"start":{"line":2,"column":13},"end":{"line":2,"column":20}},
"properties": [
{
"type": "ObjectProperty",
"start":41,"end":44,"loc":{"start":{"line":2,"column":15},"end":{"line":2,"column":18}},
"method": false,
"key": {
"type": "Identifier",
"start":41,"end":44,"loc":{"start":{"line":2,"column":15},"end":{"line":2,"column":18},"identifierName":"foo"},
"name": "foo"
},
"computed": false,
"shorthand": true,
"value": {
"type": "Identifier",
"start":41,"end":44,"loc":{"start":{"line":2,"column":15},"end":{"line":2,"column":18},"identifierName":"foo"},
"name": "foo"
},
"extra": {
"shorthand": true
}
}
]
},
"init": {
"type": "Identifier",
"start":49,"end":53,"loc":{"start":{"line":2,"column":23},"end":{"line":2,"column":27},"identifierName":"bar2"},
"name": "bar2"
}
}
],
"kind": "const"
}
}
],
"directives": []
}
}