Files

97 lines
4.3 KiB
JSON

{
"type": "File",
"start":0,"end":59,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":6,"column":1,"index":59}},
"errors": [
"SyntaxError: Private names are only allowed in property accesses (`obj.#x`) or in `in` expressions (`#x in obj`). (4:10)"
],
"program": {
"type": "Program",
"start":0,"end":59,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":6,"column":1,"index":59}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "ClassDeclaration",
"start":0,"end":59,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":6,"column":1,"index":59}},
"id": {
"type": "Identifier",
"start":6,"end":7,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":1,"column":7,"index":7},"identifierName":"C"},
"name": "C"
},
"superClass": null,
"body": {
"type": "ClassBody",
"start":8,"end":59,"loc":{"start":{"line":1,"column":8,"index":8},"end":{"line":6,"column":1,"index":59}},
"body": [
{
"type": "ClassPrivateProperty",
"start":12,"end":15,"loc":{"start":{"line":2,"column":2,"index":12},"end":{"line":2,"column":5,"index":15}},
"static": false,
"key": {
"type": "PrivateName",
"start":12,"end":14,"loc":{"start":{"line":2,"column":2,"index":12},"end":{"line":2,"column":4,"index":14}},
"id": {
"type": "Identifier",
"start":13,"end":14,"loc":{"start":{"line":2,"column":3,"index":13},"end":{"line":2,"column":4,"index":14},"identifierName":"x"},
"name": "x"
}
},
"value": null
},
{
"type": "ClassMethod",
"start":18,"end":57,"loc":{"start":{"line":3,"column":2,"index":18},"end":{"line":5,"column":3,"index":57}},
"static": false,
"key": {
"type": "Identifier",
"start":24,"end":28,"loc":{"start":{"line":3,"column":8,"index":24},"end":{"line":3,"column":12,"index":28},"identifierName":"test"},
"name": "test"
},
"computed": false,
"kind": "method",
"id": null,
"generator": false,
"async": true,
"params": [],
"body": {
"type": "BlockStatement",
"start":31,"end":57,"loc":{"start":{"line":3,"column":15,"index":31},"end":{"line":5,"column":3,"index":57}},
"body": [
{
"type": "ExpressionStatement",
"start":37,"end":53,"loc":{"start":{"line":4,"column":4,"index":37},"end":{"line":4,"column":20,"index":53}},
"expression": {
"type": "BinaryExpression",
"start":37,"end":53,"loc":{"start":{"line":4,"column":4,"index":37},"end":{"line":4,"column":20,"index":53}},
"left": {
"type": "AwaitExpression",
"start":37,"end":45,"loc":{"start":{"line":4,"column":4,"index":37},"end":{"line":4,"column":12,"index":45}},
"argument": {
"type": "PrivateName",
"start":43,"end":45,"loc":{"start":{"line":4,"column":10,"index":43},"end":{"line":4,"column":12,"index":45}},
"id": {
"type": "Identifier",
"start":44,"end":45,"loc":{"start":{"line":4,"column":11,"index":44},"end":{"line":4,"column":12,"index":45},"identifierName":"x"},
"name": "x"
}
}
},
"operator": "in",
"right": {
"type": "ThisExpression",
"start":49,"end":53,"loc":{"start":{"line":4,"column":16,"index":49},"end":{"line":4,"column":20,"index":53}}
}
}
}
],
"directives": []
}
}
]
}
}
],
"directives": []
}
}