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

47 lines
1.5 KiB
JSON

{
"type": "File",
"start":0,"end":32,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":32}},
"errors": [
"SyntaxError: Async functions can only be declared at the top level or inside a block (1:10)"
],
"program": {
"type": "Program",
"start":0,"end":32,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":32}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "WhileStatement",
"start":0,"end":32,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":32}},
"test": {
"type": "NumericLiteral",
"start":7,"end":8,"loc":{"start":{"line":1,"column":7},"end":{"line":1,"column":8}},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
},
"body": {
"type": "FunctionDeclaration",
"start":10,"end":32,"loc":{"start":{"line":1,"column":10},"end":{"line":1,"column":32}},
"id": {
"type": "Identifier",
"start":25,"end":28,"loc":{"start":{"line":1,"column":25},"end":{"line":1,"column":28},"identifierName":"foo"},
"name": "foo"
},
"generator": false,
"async": true,
"params": [],
"body": {
"type": "BlockStatement",
"start":30,"end":32,"loc":{"start":{"line":1,"column":30},"end":{"line":1,"column":32}},
"body": [],
"directives": []
}
}
}
],
"directives": []
}
}