mirror of
https://github.com/hanzoai/babel.git
synced 2026-10-30 14:46:06 +00:00
106 lines
4.5 KiB
JSON
106 lines
4.5 KiB
JSON
{
|
|
"type": "File",
|
|
"start":0,"end":50,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":6,"column":1,"index":50}},
|
|
"errors": [
|
|
"SyntaxError: Private names are only allowed in property accesses (`obj.#x`) or in `in` expressions (`#x in obj`). (4:8)"
|
|
],
|
|
"program": {
|
|
"type": "Program",
|
|
"start":0,"end":50,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":6,"column":1,"index":50}},
|
|
"sourceType": "script",
|
|
"interpreter": null,
|
|
"body": [
|
|
{
|
|
"type": "ClassDeclaration",
|
|
"start":0,"end":50,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":6,"column":1,"index":50}},
|
|
"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":50,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":6,"column":1,"index":50}},
|
|
"body": [
|
|
{
|
|
"type": "ClassPrivateProperty",
|
|
"start":14,"end":21,"loc":{"start":{"line":2,"column":2,"index":14},"end":{"line":2,"column":9,"index":21}},
|
|
"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":"x"},
|
|
"name": "x"
|
|
}
|
|
},
|
|
"value": {
|
|
"type": "NumericLiteral",
|
|
"start":19,"end":20,"loc":{"start":{"line":2,"column":7,"index":19},"end":{"line":2,"column":8,"index":20}},
|
|
"extra": {
|
|
"rawValue": 1,
|
|
"raw": "1"
|
|
},
|
|
"value": 1
|
|
}
|
|
},
|
|
{
|
|
"type": "ClassMethod",
|
|
"start":24,"end":48,"loc":{"start":{"line":3,"column":2,"index":24},"end":{"line":5,"column":3,"index":48}},
|
|
"static": false,
|
|
"key": {
|
|
"type": "Identifier",
|
|
"start":24,"end":28,"loc":{"start":{"line":3,"column":2,"index":24},"end":{"line":3,"column":6,"index":28},"identifierName":"test"},
|
|
"name": "test"
|
|
},
|
|
"computed": false,
|
|
"kind": "method",
|
|
"id": null,
|
|
"generator": false,
|
|
"async": false,
|
|
"params": [],
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"start":31,"end":48,"loc":{"start":{"line":3,"column":9,"index":31},"end":{"line":5,"column":3,"index":48}},
|
|
"body": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"start":37,"end":44,"loc":{"start":{"line":4,"column":4,"index":37},"end":{"line":4,"column":11,"index":44}},
|
|
"expression": {
|
|
"type": "BinaryExpression",
|
|
"start":37,"end":43,"loc":{"start":{"line":4,"column":4,"index":37},"end":{"line":4,"column":10,"index":43}},
|
|
"left": {
|
|
"type": "NumericLiteral",
|
|
"start":37,"end":38,"loc":{"start":{"line":4,"column":4,"index":37},"end":{"line":4,"column":5,"index":38}},
|
|
"extra": {
|
|
"rawValue": 1,
|
|
"raw": "1"
|
|
},
|
|
"value": 1
|
|
},
|
|
"operator": "+",
|
|
"right": {
|
|
"type": "PrivateName",
|
|
"start":41,"end":43,"loc":{"start":{"line":4,"column":8,"index":41},"end":{"line":4,"column":10,"index":43}},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"start":42,"end":43,"loc":{"start":{"line":4,"column":9,"index":42},"end":{"line":4,"column":10,"index":43},"identifierName":"x"},
|
|
"name": "x"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"directives": []
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"directives": []
|
|
}
|
|
}
|