Files

110 lines
5.0 KiB
JSON

{
"type": "File",
"start":0,"end":64,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":7,"column":1,"index":64}},
"errors": [
"SyntaxError: Private names are only allowed in property accesses (`obj.#a`) or in `in` expressions (`#a in obj`). (5:17)",
"SyntaxError: 'for-in' loop variable declaration may not have an initializer. (5:9)"
],
"program": {
"type": "Program",
"start":0,"end":64,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":7,"column":1,"index":64}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "ClassDeclaration",
"start":0,"end":64,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":7,"column":1,"index":64}},
"id": {
"type": "Identifier",
"start":6,"end":9,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":1,"column":9,"index":9},"identifierName":"Foo"},
"name": "Foo"
},
"superClass": null,
"body": {
"type": "ClassBody",
"start":10,"end":64,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":7,"column":1,"index":64}},
"body": [
{
"type": "ClassPrivateProperty",
"start":14,"end":17,"loc":{"start":{"line":2,"column":2,"index":14},"end":{"line":2,"column":5,"index":17}},
"static": false,
"key": {
"type": "PrivateName",
"start":14,"end":16,"loc":{"start":{"line":2,"column":2,"index":14},"end":{"line":2,"column":4,"index":16}},
"id": {
"type": "Identifier",
"start":15,"end":16,"loc":{"start":{"line":2,"column":3,"index":15},"end":{"line":2,"column":4,"index":16},"identifierName":"a"},
"name": "a"
}
},
"value": null
},
{
"type": "ClassMethod",
"start":21,"end":62,"loc":{"start":{"line":4,"column":2,"index":21},"end":{"line":6,"column":3,"index":62}},
"static": false,
"key": {
"type": "Identifier",
"start":21,"end":27,"loc":{"start":{"line":4,"column":2,"index":21},"end":{"line":4,"column":8,"index":27},"identifierName":"method"},
"name": "method"
},
"computed": false,
"kind": "method",
"id": null,
"generator": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start":30,"end":62,"loc":{"start":{"line":4,"column":11,"index":30},"end":{"line":6,"column":3,"index":62}},
"body": [
{
"type": "ForInStatement",
"start":36,"end":58,"loc":{"start":{"line":5,"column":4,"index":36},"end":{"line":5,"column":26,"index":58}},
"left": {
"type": "VariableDeclaration",
"start":41,"end":51,"loc":{"start":{"line":5,"column":9,"index":41},"end":{"line":5,"column":19,"index":51}},
"declarations": [
{
"type": "VariableDeclarator",
"start":45,"end":51,"loc":{"start":{"line":5,"column":13,"index":45},"end":{"line":5,"column":19,"index":51}},
"id": {
"type": "Identifier",
"start":45,"end":46,"loc":{"start":{"line":5,"column":13,"index":45},"end":{"line":5,"column":14,"index":46},"identifierName":"x"},
"name": "x"
},
"init": {
"type": "PrivateName",
"start":49,"end":51,"loc":{"start":{"line":5,"column":17,"index":49},"end":{"line":5,"column":19,"index":51}},
"id": {
"type": "Identifier",
"start":50,"end":51,"loc":{"start":{"line":5,"column":18,"index":50},"end":{"line":5,"column":19,"index":51},"identifierName":"a"},
"name": "a"
}
}
}
],
"kind": "var"
},
"right": {
"type": "Identifier",
"start":55,"end":56,"loc":{"start":{"line":5,"column":23,"index":55},"end":{"line":5,"column":24,"index":56},"identifierName":"y"},
"name": "y"
},
"body": {
"type": "EmptyStatement",
"start":57,"end":58,"loc":{"start":{"line":5,"column":25,"index":57},"end":{"line":5,"column":26,"index":58}}
}
}
],
"directives": []
}
}
]
}
}
],
"directives": []
}
}