Debian Codegraph @

packages/babel-parser/test/fixtures/es2022/private-in/invalid-private-followed-by-in-2/output.json

raw symbols SCIP
1 {
2 "type": "File",
3 "start":0,"end":52,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":6,"column":1,"index":52}},
4 "errors": [
5 "SyntaxError: Private names are only allowed in property accesses (`obj.#a`) or in `in` expressions (`#a in obj`). (4:8)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":52,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":6,"column":1,"index":52}},
10 "sourceType": "script",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "ClassDeclaration",
15 "start":0,"end":52,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":6,"column":1,"index":52}},
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":52,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":6,"column":1,"index":52}},
25 "body": [
26 {
27 "type": "ClassPrivateProperty",
28 "start":14,"end":17,"loc":{"start":{"line":2,"column":2,"index":14},"end":{"line":2,"column":5,"index":17}},
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":"a"},
36 "name": "a"
37 }
38 },
39 "value": null
40 },
41 {
42 "type": "ClassMethod",
43 "start":20,"end":50,"loc":{"start":{"line":3,"column":2,"index":20},"end":{"line":5,"column":3,"index":50}},
44 "static": false,
45 "key": {
46 "type": "Identifier",
47 "start":20,"end":26,"loc":{"start":{"line":3,"column":2,"index":20},"end":{"line":3,"column":8,"index":26},"identifierName":"method"},
48 "name": "method"
49 },
50 "computed": false,
51 "kind": "method",
52 "id": null,
53 "generator": false,
54 "async": false,
55 "params": [],
56 "body": {
57 "type": "BlockStatement",
58 "start":29,"end":50,"loc":{"start":{"line":3,"column":11,"index":29},"end":{"line":5,"column":3,"index":50}},
59 "body": [
60 {
61 "type": "ExpressionStatement",
62 "start":35,"end":46,"loc":{"start":{"line":4,"column":4,"index":35},"end":{"line":4,"column":15,"index":46}},
63 "expression": {
64 "type": "BinaryExpression",
65 "start":35,"end":46,"loc":{"start":{"line":4,"column":4,"index":35},"end":{"line":4,"column":15,"index":46}},
66 "left": {
67 "type": "BinaryExpression",
68 "start":35,"end":41,"loc":{"start":{"line":4,"column":4,"index":35},"end":{"line":4,"column":10,"index":41}},
69 "left": {
70 "type": "NumericLiteral",
71 "start":35,"end":36,"loc":{"start":{"line":4,"column":4,"index":35},"end":{"line":4,"column":5,"index":36}},
72 "extra": {
73 "rawValue": 1,
74 "raw": "1"
75 },
76 "value": 1
77 },
78 "operator": "+",
79 "right": {
80 "type": "PrivateName",
81 "start":39,"end":41,"loc":{"start":{"line":4,"column":8,"index":39},"end":{"line":4,"column":10,"index":41}},
82 "id": {
83 "type": "Identifier",
84 "start":40,"end":41,"loc":{"start":{"line":4,"column":9,"index":40},"end":{"line":4,"column":10,"index":41},"identifierName":"a"},
85 "name": "a"
86 }
87 }
88 },
89 "operator": "in",
90 "right": {
91 "type": "Identifier",
92 "start":45,"end":46,"loc":{"start":{"line":4,"column":14,"index":45},"end":{"line":4,"column":15,"index":46},"identifierName":"b"},
93 "name": "b"
94 }
95 }
96 }
97 ],
98 "directives": []
99 }
100 }
101 ]
102 }
103 }
104 ],
105 "directives": []
106 }
107 }