Debian Codegraph @

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

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