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

99 lines
4.2 KiB
JSON

{
"type": "File",
"start":0,"end":94,"loc":{"start":{"line":1,"column":0},"end":{"line":7,"column":1}},
"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? (4:12)"
],
"program": {
"type": "Program",
"start":0,"end":94,"loc":{"start":{"line":1,"column":0},"end":{"line":7,"column":1}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "ClassDeclaration",
"start":0,"end":94,"loc":{"start":{"line":1,"column":0},"end":{"line":7,"column":1}},
"id": {
"type": "Identifier",
"start":6,"end":7,"loc":{"start":{"line":1,"column":6},"end":{"line":1,"column":7},"identifierName":"A"},
"name": "A"
},
"superClass": {
"type": "Identifier",
"start":16,"end":17,"loc":{"start":{"line":1,"column":16},"end":{"line":1,"column":17},"identifierName":"B"},
"name": "B"
},
"body": {
"type": "ClassBody",
"start":18,"end":94,"loc":{"start":{"line":1,"column":18},"end":{"line":7,"column":1}},
"body": [
{
"type": "ClassMethod",
"start":22,"end":92,"loc":{"start":{"line":2,"column":2},"end":{"line":6,"column":3}},
"static": false,
"key": {
"type": "Identifier",
"start":22,"end":33,"loc":{"start":{"line":2,"column":2},"end":{"line":2,"column":13},"identifierName":"constructor"},
"name": "constructor"
},
"computed": false,
"kind": "constructor",
"id": null,
"generator": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start":36,"end":92,"loc":{"start":{"line":2,"column":16},"end":{"line":6,"column":3}},
"body": [
{
"type": "ClassDeclaration",
"start":42,"end":88,"loc":{"start":{"line":3,"column":4},"end":{"line":5,"column":5}},
"id": {
"type": "Identifier",
"start":48,"end":49,"loc":{"start":{"line":3,"column":10},"end":{"line":3,"column":11},"identifierName":"C"},
"name": "C"
},
"superClass": {
"type": "Identifier",
"start":58,"end":59,"loc":{"start":{"line":3,"column":20},"end":{"line":3,"column":21},"identifierName":"D"},
"name": "D"
},
"body": {
"type": "ClassBody",
"start":60,"end":88,"loc":{"start":{"line":3,"column":22},"end":{"line":5,"column":5}},
"body": [
{
"type": "ClassProperty",
"start":68,"end":82,"loc":{"start":{"line":4,"column":6},"end":{"line":4,"column":20}},
"static": false,
"key": {
"type": "Identifier",
"start":68,"end":71,"loc":{"start":{"line":4,"column":6},"end":{"line":4,"column":9},"identifierName":"foo"},
"name": "foo"
},
"computed": false,
"value": {
"type": "CallExpression",
"start":74,"end":81,"loc":{"start":{"line":4,"column":12},"end":{"line":4,"column":19}},
"callee": {
"type": "Super",
"start":74,"end":79,"loc":{"start":{"line":4,"column":12},"end":{"line":4,"column":17}}
},
"arguments": []
}
}
]
}
}
],
"directives": []
}
}
]
}
}
],
"directives": []
}
}