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

48 lines
1.5 KiB
JSON

{
"type": "File",
"start":0,"end":25,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":25}},
"errors": [
"SyntaxError: Generators can only be declared at the top level or inside a block (1:16)"
],
"program": {
"type": "Program",
"start":0,"end":25,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":25}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "IfStatement",
"start":0,"end":25,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":25}},
"test": {
"type": "NumericLiteral",
"start":4,"end":5,"loc":{"start":{"line":1,"column":4},"end":{"line":1,"column":5}},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
},
"consequent": {
"type": "FunctionDeclaration",
"start":7,"end":25,"loc":{"start":{"line":1,"column":7},"end":{"line":1,"column":25}},
"id": {
"type": "Identifier",
"start":17,"end":20,"loc":{"start":{"line":1,"column":17},"end":{"line":1,"column":20},"identifierName":"foo"},
"name": "foo"
},
"generator": true,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start":23,"end":25,"loc":{"start":{"line":1,"column":23},"end":{"line":1,"column":25}},
"body": [],
"directives": []
}
},
"alternate": null
}
],
"directives": []
}
}