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

56 lines
2.0 KiB
JSON

{
"type": "File",
"start":0,"end":33,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":33}},
"errors": [
"SyntaxError: yield is not allowed in generator parameters (1:17)",
"SyntaxError: yield is not allowed in generator parameters (1:24)"
],
"program": {
"type": "Program",
"start":0,"end":33,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":33}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "FunctionDeclaration",
"start":0,"end":33,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":33}},
"id": {
"type": "Identifier",
"start":10,"end":12,"loc":{"start":{"line":1,"column":10},"end":{"line":1,"column":12},"identifierName":"fn"},
"name": "fn"
},
"generator": true,
"async": false,
"params": [
{
"type": "AssignmentPattern",
"start":13,"end":29,"loc":{"start":{"line":1,"column":13},"end":{"line":1,"column":29}},
"left": {
"type": "Identifier",
"start":13,"end":14,"loc":{"start":{"line":1,"column":13},"end":{"line":1,"column":14},"identifierName":"x"},
"name": "x"
},
"right": {
"type": "YieldExpression",
"start":17,"end":29,"loc":{"start":{"line":1,"column":17},"end":{"line":1,"column":29}},
"delegate": true,
"argument": {
"type": "YieldExpression",
"start":24,"end":29,"loc":{"start":{"line":1,"column":24},"end":{"line":1,"column":29}},
"delegate": false,
"argument": null
}
}
}
],
"body": {
"type": "BlockStatement",
"start":31,"end":33,"loc":{"start":{"line":1,"column":31},"end":{"line":1,"column":33}},
"body": [],
"directives": []
}
}
],
"directives": []
}
}