Debian Codegraph @

packages/babel-parser/test/fixtures/es2022/class-private-methods/combined/output.json

raw symbols SCIP
1 {
2 "type": "File",
3 "start":0,"end":159,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":16,"column":1,"index":159}},
4 "program": {
5 "type": "Program",
6 "start":0,"end":159,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":16,"column":1,"index":159}},
7 "sourceType": "script",
8 "interpreter": null,
9 "body": [
10 {
11 "type": "ClassDeclaration",
12 "start":0,"end":159,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":16,"column":1,"index":159}},
13 "id": {
14 "type": "Identifier",
15 "start":6,"end":9,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":1,"column":9,"index":9},"identifierName":"Foo"},
16 "name": "Foo"
17 },
18 "superClass": null,
19 "body": {
20 "type": "ClassBody",
21 "start":10,"end":159,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":16,"column":1,"index":159}},
22 "body": [
23 {
24 "type": "ClassProperty",
25 "start":14,"end":20,"loc":{"start":{"line":2,"column":2,"index":14},"end":{"line":2,"column":8,"index":20}},
26 "static": false,
27 "key": {
28 "type": "Identifier",
29 "start":14,"end":15,"loc":{"start":{"line":2,"column":2,"index":14},"end":{"line":2,"column":3,"index":15},"identifierName":"a"},
30 "name": "a"
31 },
32 "computed": false,
33 "value": {
34 "type": "NumericLiteral",
35 "start":18,"end":19,"loc":{"start":{"line":2,"column":6,"index":18},"end":{"line":2,"column":7,"index":19}},
36 "extra": {
37 "rawValue": 1,
38 "raw": "1"
39 },
40 "value": 1
41 }
42 },
43 {
44 "type": "ClassPrivateMethod",
45 "start":24,"end":52,"loc":{"start":{"line":4,"column":2,"index":24},"end":{"line":6,"column":3,"index":52}},
46 "static": false,
47 "kind": "method",
48 "key": {
49 "type": "PrivateName",
50 "start":25,"end":27,"loc":{"start":{"line":4,"column":3,"index":25},"end":{"line":4,"column":5,"index":27}},
51 "id": {
52 "type": "Identifier",
53 "start":26,"end":27,"loc":{"start":{"line":4,"column":4,"index":26},"end":{"line":4,"column":5,"index":27},"identifierName":"a"},
54 "name": "a"
55 }
56 },
57 "id": null,
58 "generator": true,
59 "async": false,
60 "params": [],
61 "body": {
62 "type": "BlockStatement",
63 "start":30,"end":52,"loc":{"start":{"line":4,"column":8,"index":30},"end":{"line":6,"column":3,"index":52}},
64 "body": [
65 {
66 "type": "ExpressionStatement",
67 "start":36,"end":48,"loc":{"start":{"line":5,"column":4,"index":36},"end":{"line":5,"column":16,"index":48}},
68 "expression": {
69 "type": "YieldExpression",
70 "start":36,"end":47,"loc":{"start":{"line":5,"column":4,"index":36},"end":{"line":5,"column":15,"index":47}},
71 "delegate": false,
72 "argument": {
73 "type": "CallExpression",
74 "start":42,"end":47,"loc":{"start":{"line":5,"column":10,"index":42},"end":{"line":5,"column":15,"index":47}},
75 "callee": {
76 "type": "Identifier",
77 "start":42,"end":45,"loc":{"start":{"line":5,"column":10,"index":42},"end":{"line":5,"column":13,"index":45},"identifierName":"bar"},
78 "name": "bar"
79 },
80 "arguments": []
81 }
82 }
83 }
84 ],
85 "directives": []
86 }
87 },
88 {
89 "type": "ClassPrivateProperty",
90 "start":56,"end":63,"loc":{"start":{"line":8,"column":2,"index":56},"end":{"line":8,"column":9,"index":63}},
91 "static": false,
92 "key": {
93 "type": "PrivateName",
94 "start":56,"end":58,"loc":{"start":{"line":8,"column":2,"index":56},"end":{"line":8,"column":4,"index":58}},
95 "id": {
96 "type": "Identifier",
97 "start":57,"end":58,"loc":{"start":{"line":8,"column":3,"index":57},"end":{"line":8,"column":4,"index":58},"identifierName":"b"},
98 "name": "b"
99 }
100 },
101 "value": {
102 "type": "NumericLiteral",
103 "start":61,"end":62,"loc":{"start":{"line":8,"column":7,"index":61},"end":{"line":8,"column":8,"index":62}},
104 "extra": {
105 "rawValue": 2,
106 "raw": "2"
107 },
108 "value": 2
109 }
110 },
111 {
112 "type": "ClassMethod",
113 "start":67,"end":91,"loc":{"start":{"line":10,"column":2,"index":67},"end":{"line":10,"column":26,"index":91}},
114 "static": false,
115 "key": {
116 "type": "Identifier",
117 "start":71,"end":72,"loc":{"start":{"line":10,"column":6,"index":71},"end":{"line":10,"column":7,"index":72},"identifierName":"b"},
118 "name": "b"
119 },
120 "computed": false,
121 "kind": "get",
122 "id": null,
123 "generator": false,
124 "async": false,
125 "params": [],
126 "body": {
127 "type": "BlockStatement",
128 "start":75,"end":91,"loc":{"start":{"line":10,"column":10,"index":75},"end":{"line":10,"column":26,"index":91}},
129 "body": [
130 {
131 "type": "ReturnStatement",
132 "start":77,"end":89,"loc":{"start":{"line":10,"column":12,"index":77},"end":{"line":10,"column":24,"index":89}},
133 "argument": {
134 "type": "NumericLiteral",
135 "start":84,"end":88,"loc":{"start":{"line":10,"column":19,"index":84},"end":{"line":10,"column":23,"index":88}},
136 "extra": {
137 "rawValue": 9999,
138 "raw": "9999"
139 },
140 "value": 9999
141 }
142 }
143 ],
144 "directives": []
145 }
146 },
147 {
148 "type": "ClassPrivateMethod",
149 "start":94,"end":117,"loc":{"start":{"line":11,"column":2,"index":94},"end":{"line":11,"column":25,"index":117}},
150 "static": false,
151 "key": {
152 "type": "PrivateName",
153 "start":98,"end":100,"loc":{"start":{"line":11,"column":6,"index":98},"end":{"line":11,"column":8,"index":100}},
154 "id": {
155 "type": "Identifier",
156 "start":99,"end":100,"loc":{"start":{"line":11,"column":7,"index":99},"end":{"line":11,"column":8,"index":100},"identifierName":"c"},
157 "name": "c"
158 }
159 },
160 "computed": false,
161 "kind": "set",
162 "id": null,
163 "generator": false,
164 "async": false,
165 "params": [
166 {
167 "type": "Identifier",
168 "start":101,"end":102,"loc":{"start":{"line":11,"column":9,"index":101},"end":{"line":11,"column":10,"index":102},"identifierName":"x"},
169 "name": "x"
170 }
171 ],
172 "body": {
173 "type": "BlockStatement",
174 "start":104,"end":117,"loc":{"start":{"line":11,"column":12,"index":104},"end":{"line":11,"column":25,"index":117}},
175 "body": [
176 {
177 "type": "ReturnStatement",
178 "start":106,"end":115,"loc":{"start":{"line":11,"column":14,"index":106},"end":{"line":11,"column":23,"index":115}},
179 "argument": {
180 "type": "Identifier",
181 "start":113,"end":114,"loc":{"start":{"line":11,"column":21,"index":113},"end":{"line":11,"column":22,"index":114},"identifierName":"x"},
182 "name": "x"
183 }
184 }
185 ],
186 "directives": []
187 }
188 },
189 {
190 "type": "ClassPrivateMethod",
191 "start":121,"end":157,"loc":{"start":{"line":13,"column":2,"index":121},"end":{"line":15,"column":3,"index":157}},
192 "static": false,
193 "key": {
194 "type": "PrivateName",
195 "start":121,"end":123,"loc":{"start":{"line":13,"column":2,"index":121},"end":{"line":13,"column":4,"index":123}},
196 "id": {
197 "type": "Identifier",
198 "start":122,"end":123,"loc":{"start":{"line":13,"column":3,"index":122},"end":{"line":13,"column":4,"index":123},"identifierName":"d"},
199 "name": "d"
200 }
201 },
202 "kind": "method",
203 "id": null,
204 "generator": false,
205 "async": false,
206 "params": [],
207 "body": {
208 "type": "BlockStatement",
209 "start":126,"end":157,"loc":{"start":{"line":13,"column":7,"index":126},"end":{"line":15,"column":3,"index":157}},
210 "body": [
211 {
212 "type": "ReturnStatement",
213 "start":132,"end":153,"loc":{"start":{"line":14,"column":4,"index":132},"end":{"line":14,"column":25,"index":153}},
214 "argument": {
215 "type": "CallExpression",
216 "start":139,"end":152,"loc":{"start":{"line":14,"column":11,"index":139},"end":{"line":14,"column":24,"index":152}},
217 "callee": {
218 "type": "MemberExpression",
219 "start":139,"end":150,"loc":{"start":{"line":14,"column":11,"index":139},"end":{"line":14,"column":22,"index":150}},
220 "object": {
221 "type": "Identifier",
222 "start":139,"end":143,"loc":{"start":{"line":14,"column":11,"index":139},"end":{"line":14,"column":15,"index":143},"identifierName":"Math"},
223 "name": "Math"
224 },
225 "computed": false,
226 "property": {
227 "type": "Identifier",
228 "start":144,"end":150,"loc":{"start":{"line":14,"column":16,"index":144},"end":{"line":14,"column":22,"index":150},"identifierName":"random"},
229 "name": "random"
230 }
231 },
232 "arguments": []
233 }
234 }
235 ],
236 "directives": []
237 }
238 }
239 ]
240 }
241 }
242 ],
243 "directives": []
244 }
245 }