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

90 lines
3.4 KiB
JSON

{
"type": "File",
"start":0,"end":51,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":51}},
"errors": [
"SyntaxError: super() is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class? (1:40)"
],
"program": {
"type": "Program",
"start":0,"end":51,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":51}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "ExpressionStatement",
"start":14,"end":51,"loc":{"start":{"line":1,"column":14},"end":{"line":1,"column":51}},
"expression": {
"type": "ClassExpression",
"start":15,"end":50,"loc":{"start":{"line":1,"column":15},"end":{"line":1,"column":50}},
"id": {
"type": "Identifier",
"start":21,"end":22,"loc":{"start":{"line":1,"column":21},"end":{"line":1,"column":22},"identifierName":"A"},
"name": "A"
},
"superClass": null,
"body": {
"type": "ClassBody",
"start":23,"end":50,"loc":{"start":{"line":1,"column":23},"end":{"line":1,"column":50}},
"body": [
{
"type": "ClassMethod",
"start":24,"end":49,"loc":{"start":{"line":1,"column":24},"end":{"line":1,"column":49}},
"static": false,
"key": {
"type": "Identifier",
"start":24,"end":35,"loc":{"start":{"line":1,"column":24},"end":{"line":1,"column":35},"identifierName":"constructor"},
"name": "constructor"
},
"computed": false,
"kind": "constructor",
"id": null,
"generator": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start":38,"end":49,"loc":{"start":{"line":1,"column":38},"end":{"line":1,"column":49}},
"body": [
{
"type": "ExpressionStatement",
"start":40,"end":47,"loc":{"start":{"line":1,"column":40},"end":{"line":1,"column":47}},
"expression": {
"type": "CallExpression",
"start":40,"end":47,"loc":{"start":{"line":1,"column":40},"end":{"line":1,"column":47}},
"callee": {
"type": "Super",
"start":40,"end":45,"loc":{"start":{"line":1,"column":40},"end":{"line":1,"column":45}}
},
"arguments": []
}
}
],
"directives": []
}
}
]
},
"extra": {
"parenthesized": true,
"parenStart": 14
}
}
}
],
"directives": [
{
"type": "Directive",
"start":0,"end":13,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":13}},
"value": {
"type": "DirectiveLiteral",
"start":0,"end":12,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":12}},
"value": "use strict",
"extra": {
"raw": "\"use strict\"",
"rawValue": "use strict"
}
}
}
]
}
}