Debian Codegraph @

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

raw
1 {
2 "type": "File",
3 "start":0,"end":212,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":13,"column":1,"index":212}},
4 "program": {
5 "type": "Program",
6 "start":0,"end":212,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":13,"column":1,"index":212}},
7 "sourceType": "script",
8 "interpreter": null,
9 "body": [
10 {
11 "type": "ClassDeclaration",
12 "start":0,"end":212,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":13,"column":1,"index":212}},
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":212,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":13,"column":1,"index":212}},
22 "body": [
23 {
24 "type": "ClassPrivateMethod",
25 "start":14,"end":210,"loc":{"start":{"line":2,"column":2,"index":14},"end":{"line":12,"column":3,"index":210}},
26 "static": false,
27 "key": {
28 "type": "PrivateName",
29 "start":21,"end":31,"loc":{"start":{"line":2,"column":9,"index":21},"end":{"line":2,"column":19,"index":31}},
30 "id": {
31 "type": "Identifier",
32 "start":22,"end":31,"loc":{"start":{"line":2,"column":10,"index":22},"end":{"line":2,"column":19,"index":31},"identifierName":"readLines"},
33 "name": "readLines"
34 }
35 },
36 "computed": false,
37 "kind": "method",
38 "id": null,
39 "generator": true,
40 "async": true,
41 "params": [
42 {
43 "type": "Identifier",
44 "start":32,"end":36,"loc":{"start":{"line":2,"column":20,"index":32},"end":{"line":2,"column":24,"index":36},"identifierName":"path"},
45 "name": "path"
46 }
47 ],
48 "body": {
49 "type": "BlockStatement",
50 "start":38,"end":210,"loc":{"start":{"line":2,"column":26,"index":38},"end":{"line":12,"column":3,"index":210}},
51 "body": [
52 {
53 "type": "VariableDeclaration",
54 "start":44,"end":76,"loc":{"start":{"line":3,"column":4,"index":44},"end":{"line":3,"column":36,"index":76}},
55 "declarations": [
56 {
57 "type": "VariableDeclarator",
58 "start":48,"end":75,"loc":{"start":{"line":3,"column":8,"index":48},"end":{"line":3,"column":35,"index":75}},
59 "id": {
60 "type": "Identifier",
61 "start":48,"end":52,"loc":{"start":{"line":3,"column":8,"index":48},"end":{"line":3,"column":12,"index":52},"identifierName":"file"},
62 "name": "file"
63 },
64 "init": {
65 "type": "AwaitExpression",
66 "start":55,"end":75,"loc":{"start":{"line":3,"column":15,"index":55},"end":{"line":3,"column":35,"index":75}},
67 "argument": {
68 "type": "CallExpression",
69 "start":61,"end":75,"loc":{"start":{"line":3,"column":21,"index":61},"end":{"line":3,"column":35,"index":75}},
70 "callee": {
71 "type": "Identifier",
72 "start":61,"end":69,"loc":{"start":{"line":3,"column":21,"index":61},"end":{"line":3,"column":29,"index":69},"identifierName":"fileOpen"},
73 "name": "fileOpen"
74 },
75 "arguments": [
76 {
77 "type": "Identifier",
78 "start":70,"end":74,"loc":{"start":{"line":3,"column":30,"index":70},"end":{"line":3,"column":34,"index":74},"identifierName":"path"},
79 "name": "path"
80 }
81 ]
82 }
83 }
84 }
85 ],
86 "kind": "let"
87 },
88 {
89 "type": "TryStatement",
90 "start":82,"end":206,"loc":{"start":{"line":5,"column":4,"index":82},"end":{"line":11,"column":5,"index":206}},
91 "block": {
92 "type": "BlockStatement",
93 "start":86,"end":164,"loc":{"start":{"line":5,"column":8,"index":86},"end":{"line":9,"column":5,"index":164}},
94 "body": [
95 {
96 "type": "WhileStatement",
97 "start":94,"end":158,"loc":{"start":{"line":6,"column":6,"index":94},"end":{"line":8,"column":7,"index":158}},
98 "test": {
99 "type": "UnaryExpression",
100 "start":101,"end":110,"loc":{"start":{"line":6,"column":13,"index":101},"end":{"line":6,"column":22,"index":110}},
101 "operator": "!",
102 "prefix": true,
103 "argument": {
104 "type": "MemberExpression",
105 "start":102,"end":110,"loc":{"start":{"line":6,"column":14,"index":102},"end":{"line":6,"column":22,"index":110}},
106 "object": {
107 "type": "Identifier",
108 "start":102,"end":106,"loc":{"start":{"line":6,"column":14,"index":102},"end":{"line":6,"column":18,"index":106},"identifierName":"file"},
109 "name": "file"
110 },
111 "computed": false,
112 "property": {
113 "type": "Identifier",
114 "start":107,"end":110,"loc":{"start":{"line":6,"column":19,"index":107},"end":{"line":6,"column":22,"index":110},"identifierName":"EOF"},
115 "name": "EOF"
116 }
117 }
118 },
119 "body": {
120 "type": "BlockStatement",
121 "start":112,"end":158,"loc":{"start":{"line":6,"column":24,"index":112},"end":{"line":8,"column":7,"index":158}},
122 "body": [
123 {
124 "type": "ExpressionStatement",
125 "start":122,"end":150,"loc":{"start":{"line":7,"column":8,"index":122},"end":{"line":7,"column":36,"index":150}},
126 "expression": {
127 "type": "YieldExpression",
128 "start":122,"end":149,"loc":{"start":{"line":7,"column":8,"index":122},"end":{"line":7,"column":35,"index":149}},
129 "delegate": false,
130 "argument": {
131 "type": "AwaitExpression",
132 "start":128,"end":149,"loc":{"start":{"line":7,"column":14,"index":128},"end":{"line":7,"column":35,"index":149}},
133 "argument": {
134 "type": "CallExpression",
135 "start":134,"end":149,"loc":{"start":{"line":7,"column":20,"index":134},"end":{"line":7,"column":35,"index":149}},
136 "callee": {
137 "type": "MemberExpression",
138 "start":134,"end":147,"loc":{"start":{"line":7,"column":20,"index":134},"end":{"line":7,"column":33,"index":147}},
139 "object": {
140 "type": "Identifier",
141 "start":134,"end":138,"loc":{"start":{"line":7,"column":20,"index":134},"end":{"line":7,"column":24,"index":138},"identifierName":"file"},
142 "name": "file"
143 },
144 "computed": false,
145 "property": {
146 "type": "Identifier",
147 "start":139,"end":147,"loc":{"start":{"line":7,"column":25,"index":139},"end":{"line":7,"column":33,"index":147},"identifierName":"readLine"},
148 "name": "readLine"
149 }
150 },
151 "arguments": []
152 }
153 }
154 }
155 }
156 ],
157 "directives": []
158 }
159 }
160 ],
161 "directives": []
162 },
163 "handler": null,
164 "finalizer": {
165 "type": "BlockStatement",
166 "start":173,"end":206,"loc":{"start":{"line":9,"column":14,"index":173},"end":{"line":11,"column":5,"index":206}},
167 "body": [
168 {
169 "type": "ExpressionStatement",
170 "start":181,"end":200,"loc":{"start":{"line":10,"column":6,"index":181},"end":{"line":10,"column":25,"index":200}},
171 "expression": {
172 "type": "AwaitExpression",
173 "start":181,"end":199,"loc":{"start":{"line":10,"column":6,"index":181},"end":{"line":10,"column":24,"index":199}},
174 "argument": {
175 "type": "CallExpression",
176 "start":187,"end":199,"loc":{"start":{"line":10,"column":12,"index":187},"end":{"line":10,"column":24,"index":199}},
177 "callee": {
178 "type": "MemberExpression",
179 "start":187,"end":197,"loc":{"start":{"line":10,"column":12,"index":187},"end":{"line":10,"column":22,"index":197}},
180 "object": {
181 "type": "Identifier",
182 "start":187,"end":191,"loc":{"start":{"line":10,"column":12,"index":187},"end":{"line":10,"column":16,"index":191},"identifierName":"file"},
183 "name": "file"
184 },
185 "computed": false,
186 "property": {
187 "type": "Identifier",
188 "start":192,"end":197,"loc":{"start":{"line":10,"column":17,"index":192},"end":{"line":10,"column":22,"index":197},"identifierName":"close"},
189 "name": "close"
190 }
191 },
192 "arguments": []
193 }
194 }
195 }
196 ],
197 "directives": []
198 }
199 }
200 ],
201 "directives": []
202 }
203 }
204 ]
205 }
206 }
207 ],
208 "directives": []
209 }
210 }