| 1 |
{ |
| 2 |
"type": "File", |
| 3 |
"start":0,"end":46,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":6,"column":1,"index":46}}, |
| 4 |
"errors": [ |
| 5 |
"SyntaxError: Private names are only allowed in property accesses (`obj.#x`) or in `in` expressions (`#x in obj`). (4:4)" |
| 6 |
], |
| 7 |
"program": { |
| 8 |
"type": "Program", |
| 9 |
"start":0,"end":46,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":6,"column":1,"index":46}}, |
| 10 |
"sourceType": "script", |
| 11 |
"interpreter": null, |
| 12 |
"body": [ |
| 13 |
{ |
| 14 |
"type": "ClassDeclaration", |
| 15 |
"start":0,"end":46,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":6,"column":1,"index":46}}, |
| 16 |
"id": { |
| 17 |
"type": "Identifier", |
| 18 |
"start":6,"end":9,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":1,"column":9,"index":9},"identifierName":"Foo"}, |
| 19 |
"name": "Foo" |
| 20 |
}, |
| 21 |
"superClass": null, |
| 22 |
"body": { |
| 23 |
"type": "ClassBody", |
| 24 |
"start":10,"end":46,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":6,"column":1,"index":46}}, |
| 25 |
"body": [ |
| 26 |
{ |
| 27 |
"type": "ClassPrivateProperty", |
| 28 |
"start":14,"end":21,"loc":{"start":{"line":2,"column":2,"index":14},"end":{"line":2,"column":9,"index":21}}, |
| 29 |
"static": false, |
| 30 |
"key": { |
| 31 |
"type": "PrivateName", |
| 32 |
"start":14,"end":16,"loc":{"start":{"line":2,"column":2,"index":14},"end":{"line":2,"column":4,"index":16}}, |
| 33 |
"id": { |
| 34 |
"type": "Identifier", |
| 35 |
"start":15,"end":16,"loc":{"start":{"line":2,"column":3,"index":15},"end":{"line":2,"column":4,"index":16},"identifierName":"x"}, |
| 36 |
"name": "x" |
| 37 |
} |
| 38 |
}, |
| 39 |
"value": { |
| 40 |
"type": "NumericLiteral", |
| 41 |
"start":19,"end":20,"loc":{"start":{"line":2,"column":7,"index":19},"end":{"line":2,"column":8,"index":20}}, |
| 42 |
"extra": { |
| 43 |
"rawValue": 1, |
| 44 |
"raw": "1" |
| 45 |
}, |
| 46 |
"value": 1 |
| 47 |
} |
| 48 |
}, |
| 49 |
{ |
| 50 |
"type": "ClassMethod", |
| 51 |
"start":24,"end":44,"loc":{"start":{"line":3,"column":2,"index":24},"end":{"line":5,"column":3,"index":44}}, |
| 52 |
"static": false, |
| 53 |
"key": { |
| 54 |
"type": "Identifier", |
| 55 |
"start":24,"end":28,"loc":{"start":{"line":3,"column":2,"index":24},"end":{"line":3,"column":6,"index":28},"identifierName":"test"}, |
| 56 |
"name": "test" |
| 57 |
}, |
| 58 |
"computed": false, |
| 59 |
"kind": "method", |
| 60 |
"id": null, |
| 61 |
"generator": false, |
| 62 |
"async": false, |
| 63 |
"params": [], |
| 64 |
"body": { |
| 65 |
"type": "BlockStatement", |
| 66 |
"start":31,"end":44,"loc":{"start":{"line":3,"column":9,"index":31},"end":{"line":5,"column":3,"index":44}}, |
| 67 |
"body": [ |
| 68 |
{ |
| 69 |
"type": "ExpressionStatement", |
| 70 |
"start":37,"end":40,"loc":{"start":{"line":4,"column":4,"index":37},"end":{"line":4,"column":7,"index":40}}, |
| 71 |
"expression": { |
| 72 |
"type": "PrivateName", |
| 73 |
"start":37,"end":39,"loc":{"start":{"line":4,"column":4,"index":37},"end":{"line":4,"column":6,"index":39}}, |
| 74 |
"id": { |
| 75 |
"type": "Identifier", |
| 76 |
"start":38,"end":39,"loc":{"start":{"line":4,"column":5,"index":38},"end":{"line":4,"column":6,"index":39},"identifierName":"x"}, |
| 77 |
"name": "x" |
| 78 |
} |
| 79 |
} |
| 80 |
} |
| 81 |
], |
| 82 |
"directives": [] |
| 83 |
} |
| 84 |
} |
| 85 |
] |
| 86 |
} |
| 87 |
} |
| 88 |
], |
| 89 |
"directives": [] |
| 90 |
} |
| 91 |
} |