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

112 lines
4.3 KiB
JSON

{
"type": "File",
"start":0,"end":59,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":59}},
"errors": [
"SyntaxError: Binding 'eval' in strict mode (1:44)"
],
"program": {
"type": "Program",
"start":0,"end":59,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":59}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "FunctionDeclaration",
"start":0,"end":59,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":59}},
"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":59,"loc":{"start":{"line":1,"column":17},"end":{"line":1,"column":59}},
"body": [
{
"type": "ExpressionStatement",
"start":32,"end":57,"loc":{"start":{"line":1,"column":32},"end":{"line":1,"column":57}},
"expression": {
"type": "ObjectExpression",
"start":33,"end":55,"loc":{"start":{"line":1,"column":33},"end":{"line":1,"column":55}},
"properties": [
{
"type": "ObjectProperty",
"start":35,"end":40,"loc":{"start":{"line":1,"column":35},"end":{"line":1,"column":40}},
"method": false,
"key": {
"type": "Identifier",
"start":35,"end":36,"loc":{"start":{"line":1,"column":35},"end":{"line":1,"column":36},"identifierName":"i"},
"name": "i"
},
"computed": false,
"shorthand": false,
"value": {
"type": "NumericLiteral",
"start":38,"end":40,"loc":{"start":{"line":1,"column":38},"end":{"line":1,"column":40}},
"extra": {
"rawValue": 10,
"raw": "10"
},
"value": 10
}
},
{
"type": "ObjectMethod",
"start":42,"end":53,"loc":{"start":{"line":1,"column":42},"end":{"line":1,"column":53}},
"method": true,
"key": {
"type": "Identifier",
"start":42,"end":43,"loc":{"start":{"line":1,"column":42},"end":{"line":1,"column":43},"identifierName":"s"},
"name": "s"
},
"computed": false,
"kind": "method",
"id": null,
"generator": false,
"async": false,
"params": [
{
"type": "Identifier",
"start":44,"end":48,"loc":{"start":{"line":1,"column":44},"end":{"line":1,"column":48},"identifierName":"eval"},
"name": "eval"
}
],
"body": {
"type": "BlockStatement",
"start":50,"end":53,"loc":{"start":{"line":1,"column":50},"end":{"line":1,"column":53}},
"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": []
}
}