Debian Codegraph @

packages/babel-parser/test/fixtures/es2022/class-static-block/await-binding-in-async-arrow-function-in-static-block/output.json

raw symbols SCIP
1 {
2 "type": "File",
3 "start":0,"end":198,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":7,"column":54,"index":198}},
4 "errors": [
5 "SyntaxError: Can not use 'await' as identifier inside a static block. (3:28)",
6 "SyntaxError: Can not use 'await' as identifier inside a static block. (5:32)",
7 "SyntaxError: Can not use 'await' as identifier inside a static block. (7:31)"
8 ],
9 "program": {
10 "type": "Program",
11 "start":0,"end":198,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":7,"column":54,"index":198}},
12 "sourceType": "script",
13 "interpreter": null,
14 "body": [
15 {
16 "type": "VariableDeclaration",
17 "start":0,"end":6,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":6,"index":6}},
18 "declarations": [
19 {
20 "type": "VariableDeclarator",
21 "start":4,"end":5,"loc":{"start":{"line":1,"column":4,"index":4},"end":{"line":1,"column":5,"index":5}},
22 "id": {
23 "type": "Identifier",
24 "start":4,"end":5,"loc":{"start":{"line":1,"column":4,"index":4},"end":{"line":1,"column":5,"index":5},"identifierName":"C"},
25 "name": "C"
26 },
27 "init": null
28 }
29 ],
30 "kind": "var",
31 "trailingComments": [
32 {
33 "type": "CommentLine",
34 "value": " await is not allowed in async arrow",
35 "start":7,"end":45,"loc":{"start":{"line":2,"column":0,"index":7},"end":{"line":2,"column":38,"index":45}}
36 }
37 ]
38 },
39 {
40 "type": "ExpressionStatement",
41 "start":46,"end":91,"loc":{"start":{"line":3,"column":0,"index":46},"end":{"line":3,"column":45,"index":91}},
42 "expression": {
43 "type": "AssignmentExpression",
44 "start":46,"end":90,"loc":{"start":{"line":3,"column":0,"index":46},"end":{"line":3,"column":44,"index":90}},
45 "operator": "=",
46 "left": {
47 "type": "Identifier",
48 "start":46,"end":47,"loc":{"start":{"line":3,"column":0,"index":46},"end":{"line":3,"column":1,"index":47},"identifierName":"C"},
49 "name": "C"
50 },
51 "right": {
52 "type": "ClassExpression",
53 "start":50,"end":90,"loc":{"start":{"line":3,"column":4,"index":50},"end":{"line":3,"column":44,"index":90}},
54 "id": null,
55 "superClass": null,
56 "body": {
57 "type": "ClassBody",
58 "start":56,"end":90,"loc":{"start":{"line":3,"column":10,"index":56},"end":{"line":3,"column":44,"index":90}},
59 "body": [
60 {
61 "type": "StaticBlock",
62 "start":58,"end":88,"loc":{"start":{"line":3,"column":12,"index":58},"end":{"line":3,"column":42,"index":88}},
63 "body": [
64 {
65 "type": "ExpressionStatement",
66 "start":67,"end":86,"loc":{"start":{"line":3,"column":21,"index":67},"end":{"line":3,"column":40,"index":86}},
67 "expression": {
68 "type": "ArrowFunctionExpression",
69 "start":67,"end":86,"loc":{"start":{"line":3,"column":21,"index":67},"end":{"line":3,"column":40,"index":86}},
70 "id": null,
71 "generator": false,
72 "async": true,
73 "params": [
74 {
75 "type": "Identifier",
76 "start":74,"end":79,"loc":{"start":{"line":3,"column":28,"index":74},"end":{"line":3,"column":33,"index":79},"identifierName":"await"},
77 "name": "await"
78 }
79 ],
80 "body": {
81 "type": "BlockStatement",
82 "start":84,"end":86,"loc":{"start":{"line":3,"column":38,"index":84},"end":{"line":3,"column":40,"index":86}},
83 "body": [],
84 "directives": []
85 }
86 }
87 }
88 ]
89 }
90 ]
91 }
92 }
93 },
94 "leadingComments": [
95 {
96 "type": "CommentLine",
97 "value": " await is not allowed in async arrow",
98 "start":7,"end":45,"loc":{"start":{"line":2,"column":0,"index":7},"end":{"line":2,"column":38,"index":45}}
99 }
100 ]
101 },
102 {
103 "type": "ExpressionStatement",
104 "start":93,"end":142,"loc":{"start":{"line":5,"column":0,"index":93},"end":{"line":5,"column":49,"index":142}},
105 "expression": {
106 "type": "AssignmentExpression",
107 "start":93,"end":141,"loc":{"start":{"line":5,"column":0,"index":93},"end":{"line":5,"column":48,"index":141}},
108 "operator": "=",
109 "left": {
110 "type": "Identifier",
111 "start":93,"end":94,"loc":{"start":{"line":5,"column":0,"index":93},"end":{"line":5,"column":1,"index":94},"identifierName":"C"},
112 "name": "C"
113 },
114 "right": {
115 "type": "ClassExpression",
116 "start":97,"end":141,"loc":{"start":{"line":5,"column":4,"index":97},"end":{"line":5,"column":48,"index":141}},
117 "id": null,
118 "superClass": null,
119 "body": {
120 "type": "ClassBody",
121 "start":103,"end":141,"loc":{"start":{"line":5,"column":10,"index":103},"end":{"line":5,"column":48,"index":141}},
122 "body": [
123 {
124 "type": "StaticBlock",
125 "start":105,"end":139,"loc":{"start":{"line":5,"column":12,"index":105},"end":{"line":5,"column":46,"index":139}},
126 "body": [
127 {
128 "type": "ExpressionStatement",
129 "start":114,"end":137,"loc":{"start":{"line":5,"column":21,"index":114},"end":{"line":5,"column":44,"index":137}},
130 "expression": {
131 "type": "ArrowFunctionExpression",
132 "start":114,"end":137,"loc":{"start":{"line":5,"column":21,"index":114},"end":{"line":5,"column":44,"index":137}},
133 "id": null,
134 "generator": false,
135 "async": true,
136 "params": [
137 {
138 "type": "AssignmentPattern",
139 "start":121,"end":130,"loc":{"start":{"line":5,"column":28,"index":121},"end":{"line":5,"column":37,"index":130}},
140 "left": {
141 "type": "Identifier",
142 "start":121,"end":122,"loc":{"start":{"line":5,"column":28,"index":121},"end":{"line":5,"column":29,"index":122},"identifierName":"x"},
143 "name": "x"
144 },
145 "right": {
146 "type": "Identifier",
147 "start":125,"end":130,"loc":{"start":{"line":5,"column":32,"index":125},"end":{"line":5,"column":37,"index":130},"identifierName":"await"},
148 "name": "await"
149 }
150 }
151 ],
152 "body": {
153 "type": "BlockStatement",
154 "start":135,"end":137,"loc":{"start":{"line":5,"column":42,"index":135},"end":{"line":5,"column":44,"index":137}},
155 "body": [],
156 "directives": []
157 }
158 }
159 }
160 ]
161 }
162 ]
163 }
164 }
165 }
166 },
167 {
168 "type": "ExpressionStatement",
169 "start":144,"end":198,"loc":{"start":{"line":7,"column":0,"index":144},"end":{"line":7,"column":54,"index":198}},
170 "expression": {
171 "type": "AssignmentExpression",
172 "start":144,"end":197,"loc":{"start":{"line":7,"column":0,"index":144},"end":{"line":7,"column":53,"index":197}},
173 "operator": "=",
174 "left": {
175 "type": "Identifier",
176 "start":144,"end":145,"loc":{"start":{"line":7,"column":0,"index":144},"end":{"line":7,"column":1,"index":145},"identifierName":"C"},
177 "name": "C"
178 },
179 "right": {
180 "type": "ClassExpression",
181 "start":148,"end":197,"loc":{"start":{"line":7,"column":4,"index":148},"end":{"line":7,"column":53,"index":197}},
182 "id": null,
183 "superClass": null,
184 "body": {
185 "type": "ClassBody",
186 "start":154,"end":197,"loc":{"start":{"line":7,"column":10,"index":154},"end":{"line":7,"column":53,"index":197}},
187 "body": [
188 {
189 "type": "StaticBlock",
190 "start":156,"end":195,"loc":{"start":{"line":7,"column":12,"index":156},"end":{"line":7,"column":51,"index":195}},
191 "body": [
192 {
193 "type": "ExpressionStatement",
194 "start":165,"end":193,"loc":{"start":{"line":7,"column":21,"index":165},"end":{"line":7,"column":49,"index":193}},
195 "expression": {
196 "type": "ArrowFunctionExpression",
197 "start":165,"end":193,"loc":{"start":{"line":7,"column":21,"index":165},"end":{"line":7,"column":49,"index":193}},
198 "id": null,
199 "generator": false,
200 "async": true,
201 "params": [
202 {
203 "type": "ObjectPattern",
204 "start":172,"end":186,"loc":{"start":{"line":7,"column":28,"index":172},"end":{"line":7,"column":42,"index":186}},
205 "properties": [
206 {
207 "type": "ObjectProperty",
208 "start":174,"end":184,"loc":{"start":{"line":7,"column":30,"index":174},"end":{"line":7,"column":40,"index":184}},
209 "method": false,
210 "computed": true,
211 "key": {
212 "type": "Identifier",
213 "start":175,"end":180,"loc":{"start":{"line":7,"column":31,"index":175},"end":{"line":7,"column":36,"index":180},"identifierName":"await"},
214 "name": "await"
215 },
216 "shorthand": false,
217 "value": {
218 "type": "Identifier",
219 "start":183,"end":184,"loc":{"start":{"line":7,"column":39,"index":183},"end":{"line":7,"column":40,"index":184},"identifierName":"x"},
220 "name": "x"
221 }
222 }
223 ]
224 }
225 ],
226 "body": {
227 "type": "BlockStatement",
228 "start":191,"end":193,"loc":{"start":{"line":7,"column":47,"index":191},"end":{"line":7,"column":49,"index":193}},
229 "body": [],
230 "directives": []
231 }
232 }
233 }
234 ]
235 }
236 ]
237 }
238 }
239 }
240 }
241 ],
242 "directives": []
243 },
244 "comments": [
245 {
246 "type": "CommentLine",
247 "value": " await is not allowed in async arrow",
248 "start":7,"end":45,"loc":{"start":{"line":2,"column":0,"index":7},"end":{"line":2,"column":38,"index":45}}
249 }
250 ]
251 }