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

68 lines
2.3 KiB
JSON

{
"type": "File",
"start":0,"end":40,"loc":{"start":{"line":1,"column":0},"end":{"line":3,"column":17}},
"errors": [
"SyntaxError: Unexpected keyword 'const' (1:4)",
"SyntaxError: Escape sequence in keyword const (1:4)",
"SyntaxError: Escape sequence in keyword const (3:0)"
],
"program": {
"type": "Program",
"start":0,"end":40,"loc":{"start":{"line":1,"column":0},"end":{"line":3,"column":17}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "VariableDeclaration",
"start":0,"end":21,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":21}},
"declarations": [
{
"type": "VariableDeclarator",
"start":4,"end":20,"loc":{"start":{"line":1,"column":4},"end":{"line":1,"column":20}},
"id": {
"type": "Identifier",
"start":4,"end":14,"loc":{"start":{"line":1,"column":4},"end":{"line":1,"column":14},"identifierName":"const"},
"name": "const"
},
"init": {
"type": "NumericLiteral",
"start":17,"end":20,"loc":{"start":{"line":1,"column":17},"end":{"line":1,"column":20}},
"extra": {
"rawValue": 123,
"raw": "123"
},
"value": 123
}
}
],
"kind": "var"
},
{
"type": "VariableDeclaration",
"start":23,"end":40,"loc":{"start":{"line":3,"column":0},"end":{"line":3,"column":17}},
"declarations": [
{
"type": "VariableDeclarator",
"start":34,"end":39,"loc":{"start":{"line":3,"column":11},"end":{"line":3,"column":16}},
"id": {
"type": "Identifier",
"start":34,"end":35,"loc":{"start":{"line":3,"column":11},"end":{"line":3,"column":12},"identifierName":"x"},
"name": "x"
},
"init": {
"type": "NumericLiteral",
"start":38,"end":39,"loc":{"start":{"line":3,"column":15},"end":{"line":3,"column":16}},
"extra": {
"rawValue": 2,
"raw": "2"
},
"value": 2
}
}
],
"kind": "const"
}
],
"directives": []
}
}