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

93 lines
3.5 KiB
JSON

{
"type": "File",
"start":0,"end":63,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":63}},
"errors": [
"SyntaxError: Binding 'eval' in strict mode (1:47)"
],
"program": {
"type": "Program",
"start":0,"end":63,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":63}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "FunctionDeclaration",
"start":0,"end":63,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":63}},
"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":63,"loc":{"start":{"line":1,"column":17},"end":{"line":1,"column":63}},
"body": [
{
"type": "ExpressionStatement",
"start":32,"end":61,"loc":{"start":{"line":1,"column":32},"end":{"line":1,"column":61}},
"expression": {
"type": "ObjectExpression",
"start":33,"end":59,"loc":{"start":{"line":1,"column":33},"end":{"line":1,"column":59}},
"properties": [
{
"type": "ObjectProperty",
"start":35,"end":57,"loc":{"start":{"line":1,"column":35},"end":{"line":1,"column":57}},
"method": false,
"key": {
"type": "Identifier",
"start":35,"end":36,"loc":{"start":{"line":1,"column":35},"end":{"line":1,"column":36},"identifierName":"s"},
"name": "s"
},
"computed": false,
"shorthand": false,
"value": {
"type": "FunctionExpression",
"start":38,"end":57,"loc":{"start":{"line":1,"column":38},"end":{"line":1,"column":57}},
"id": {
"type": "Identifier",
"start":47,"end":51,"loc":{"start":{"line":1,"column":47},"end":{"line":1,"column":51},"identifierName":"eval"},
"name": "eval"
},
"generator": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start":54,"end":57,"loc":{"start":{"line":1,"column":54},"end":{"line":1,"column":57}},
"body": [],
"directives": []
}
}
}
],
"extra": {
"parenthesized": true,
"parenStart": 32
}
}
}
],
"directives": [
{
"type": "Directive",
"start":18,"end":31,"loc":{"start":{"line":1,"column":18},"end":{"line":1,"column":31}},
"value": {
"type": "DirectiveLiteral",
"start":18,"end":30,"loc":{"start":{"line":1,"column":18},"end":{"line":1,"column":30}},
"value": "use strict",
"extra": {
"raw": "'use strict'",
"rawValue": "use strict"
}
}
}
]
}
}
],
"directives": []
}
}