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

66 lines
2.3 KiB
JSON

{
"type": "File",
"start":0,"end":46,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":46}},
"errors": [
"SyntaxError: Unexpected reserved word 'static' (1:37)"
],
"program": {
"type": "Program",
"start":0,"end":46,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":46}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "FunctionDeclaration",
"start":0,"end":46,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":46}},
"id": {
"type": "Identifier",
"start":9,"end":14,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":14},"identifierName":"hello"},
"name": "hello"
},
"generator": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start":17,"end":46,"loc":{"start":{"line":1,"column":17},"end":{"line":1,"column":46}},
"body": [
{
"type": "VariableDeclaration",
"start":33,"end":44,"loc":{"start":{"line":1,"column":33},"end":{"line":1,"column":44}},
"declarations": [
{
"type": "VariableDeclarator",
"start":37,"end":43,"loc":{"start":{"line":1,"column":37},"end":{"line":1,"column":43}},
"id": {
"type": "Identifier",
"start":37,"end":43,"loc":{"start":{"line":1,"column":37},"end":{"line":1,"column":43},"identifierName":"static"},
"name": "static"
},
"init": null
}
],
"kind": "var"
}
],
"directives": [
{
"type": "Directive",
"start":19,"end":32,"loc":{"start":{"line":1,"column":19},"end":{"line":1,"column":32}},
"value": {
"type": "DirectiveLiteral",
"start":19,"end":31,"loc":{"start":{"line":1,"column":19},"end":{"line":1,"column":31}},
"value": "use strict",
"extra": {
"raw": "\"use strict\"",
"rawValue": "use strict"
}
}
}
]
}
}
],
"directives": []
}
}