| 1 |
{ |
| 2 |
"type": "File", |
| 3 |
"start":0,"end":64,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":7,"column":1,"index":64}}, |
| 4 |
"errors": [ |
| 5 |
"SyntaxError: Private names are only allowed in property accesses (`obj.#a`) or in `in` expressions (`#a in obj`). (5:17)", |
| 6 |
"SyntaxError: 'for-in' loop variable declaration may not have an initializer. (5:9)" |
| 7 |
], |
| 8 |
"program": { |
| 9 |
"type": "Program", |
| 10 |
"start":0,"end":64,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":7,"column":1,"index":64}}, |
| 11 |
"sourceType": "script", |
| 12 |
"interpreter": null, |
| 13 |
"body": [ |
| 14 |
{ |
| 15 |
"type": "ClassDeclaration", |
| 16 |
"start":0,"end":64,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":7,"column":1,"index":64}}, |
| 17 |
"id": { |
| 18 |
"type": "Identifier", |
| 19 |
"start":6,"end":9,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":1,"column":9,"index":9},"identifierName":"Foo"}, |
| 20 |
"name": "Foo" |
| 21 |
}, |
| 22 |
"superClass": null, |
| 23 |
"body": { |
| 24 |
"type": "ClassBody", |
| 25 |
"start":10,"end":64,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":7,"column":1,"index":64}}, |
| 26 |
"body": [ |
| 27 |
{ |
| 28 |
"type": "ClassPrivateProperty", |
| 29 |
"start":14,"end":17,"loc":{"start":{"line":2,"column":2,"index":14},"end":{"line":2,"column":5,"index":17}}, |
| 30 |
"static": false, |
| 31 |
"key": { |
| 32 |
"type": "PrivateName", |
| 33 |
"start":14,"end":16,"loc":{"start":{"line":2,"column":2,"index":14},"end":{"line":2,"column":4,"index":16}}, |
| 34 |
"id": { |
| 35 |
"type": "Identifier", |
| 36 |
"start":15,"end":16,"loc":{"start":{"line":2,"column":3,"index":15},"end":{"line":2,"column":4,"index":16},"identifierName":"a"}, |
| 37 |
"name": "a" |
| 38 |
} |
| 39 |
}, |
| 40 |
"value": null |
| 41 |
}, |
| 42 |
{ |
| 43 |
"type": "ClassMethod", |
| 44 |
"start":21,"end":62,"loc":{"start":{"line":4,"column":2,"index":21},"end":{"line":6,"column":3,"index":62}}, |
| 45 |
"static": false, |
| 46 |
"key": { |
| 47 |
"type": "Identifier", |
| 48 |
"start":21,"end":27,"loc":{"start":{"line":4,"column":2,"index":21},"end":{"line":4,"column":8,"index":27},"identifierName":"method"}, |
| 49 |
"name": "method" |
| 50 |
}, |
| 51 |
"computed": false, |
| 52 |
"kind": "method", |
| 53 |
"id": null, |
| 54 |
"generator": false, |
| 55 |
"async": false, |
| 56 |
"params": [], |
| 57 |
"body": { |
| 58 |
"type": "BlockStatement", |
| 59 |
"start":30,"end":62,"loc":{"start":{"line":4,"column":11,"index":30},"end":{"line":6,"column":3,"index":62}}, |
| 60 |
"body": [ |
| 61 |
{ |
| 62 |
"type": "ForInStatement", |
| 63 |
"start":36,"end":58,"loc":{"start":{"line":5,"column":4,"index":36},"end":{"line":5,"column":26,"index":58}}, |
| 64 |
"left": { |
| 65 |
"type": "VariableDeclaration", |
| 66 |
"start":41,"end":51,"loc":{"start":{"line":5,"column":9,"index":41},"end":{"line":5,"column":19,"index":51}}, |
| 67 |
"declarations": [ |
| 68 |
{ |
| 69 |
"type": "VariableDeclarator", |
| 70 |
"start":45,"end":51,"loc":{"start":{"line":5,"column":13,"index":45},"end":{"line":5,"column":19,"index":51}}, |
| 71 |
"id": { |
| 72 |
"type": "Identifier", |
| 73 |
"start":45,"end":46,"loc":{"start":{"line":5,"column":13,"index":45},"end":{"line":5,"column":14,"index":46},"identifierName":"x"}, |
| 74 |
"name": "x" |
| 75 |
}, |
| 76 |
"init": { |
| 77 |
"type": "PrivateName", |
| 78 |
"start":49,"end":51,"loc":{"start":{"line":5,"column":17,"index":49},"end":{"line":5,"column":19,"index":51}}, |
| 79 |
"id": { |
| 80 |
"type": "Identifier", |
| 81 |
"start":50,"end":51,"loc":{"start":{"line":5,"column":18,"index":50},"end":{"line":5,"column":19,"index":51},"identifierName":"a"}, |
| 82 |
"name": "a" |
| 83 |
} |
| 84 |
} |
| 85 |
} |
| 86 |
], |
| 87 |
"kind": "var" |
| 88 |
}, |
| 89 |
"right": { |
| 90 |
"type": "Identifier", |
| 91 |
"start":55,"end":56,"loc":{"start":{"line":5,"column":23,"index":55},"end":{"line":5,"column":24,"index":56},"identifierName":"y"}, |
| 92 |
"name": "y" |
| 93 |
}, |
| 94 |
"body": { |
| 95 |
"type": "EmptyStatement", |
| 96 |
"start":57,"end":58,"loc":{"start":{"line":5,"column":25,"index":57},"end":{"line":5,"column":26,"index":58}} |
| 97 |
} |
| 98 |
} |
| 99 |
], |
| 100 |
"directives": [] |
| 101 |
} |
| 102 |
} |
| 103 |
] |
| 104 |
} |
| 105 |
} |
| 106 |
], |
| 107 |
"directives": [] |
| 108 |
} |
| 109 |
} |