Debian Codegraph @

packages/babel-parser/test/fixtures/experimental/explicit-resource-management/invalid-in-single-statement-context/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":125,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":8,"column":1,"index":125}},
4 "errors": [
5 "SyntaxError: Lexical declaration cannot appear in a single-statement context. (2:12)",
6 "SyntaxError: Lexical declaration cannot appear in a single-statement context. (3:11)",
7 "SyntaxError: Lexical declaration cannot appear in a single-statement context. (4:5)",
8 "SyntaxError: Lexical declaration cannot appear in a single-statement context. (5:9)",
9 "SyntaxError: Lexical declaration cannot appear in a single-statement context. (6:11)",
10 "SyntaxError: Lexical declaration cannot appear in a single-statement context. (7:9)"
11 ],
12 "program": {
13 "type": "Program",
14 "start":0,"end":125,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":8,"column":1,"index":125}},
15 "sourceType": "script",
16 "interpreter": null,
17 "body": [
18 {
19 "type": "BlockStatement",
20 "start":0,"end":125,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":8,"column":1,"index":125}},
21 "body": [
22 {
23 "type": "WhileStatement",
24 "start":4,"end":22,"loc":{"start":{"line":2,"column":2,"index":4},"end":{"line":2,"column":20,"index":22}},
25 "test": {
26 "type": "NumericLiteral",
27 "start":11,"end":12,"loc":{"start":{"line":2,"column":9,"index":11},"end":{"line":2,"column":10,"index":12}},
28 "extra": {
29 "rawValue": 1,
30 "raw": "1"
31 },
32 "value": 1
33 },
34 "body": {
35 "type": "VariableDeclaration",
36 "start":14,"end":22,"loc":{"start":{"line":2,"column":12,"index":14},"end":{"line":2,"column":20,"index":22}},
37 "declarations": [
38 {
39 "type": "VariableDeclarator",
40 "start":20,"end":21,"loc":{"start":{"line":2,"column":18,"index":20},"end":{"line":2,"column":19,"index":21}},
41 "id": {
42 "type": "Identifier",
43 "start":20,"end":21,"loc":{"start":{"line":2,"column":18,"index":20},"end":{"line":2,"column":19,"index":21},"identifierName":"a"},
44 "name": "a"
45 },
46 "init": null
47 }
48 ],
49 "kind": "using"
50 }
51 },
52 {
53 "type": "ForStatement",
54 "start":25,"end":42,"loc":{"start":{"line":3,"column":2,"index":25},"end":{"line":3,"column":19,"index":42}},
55 "init": null,
56 "test": null,
57 "update": null,
58 "body": {
59 "type": "VariableDeclaration",
60 "start":34,"end":42,"loc":{"start":{"line":3,"column":11,"index":34},"end":{"line":3,"column":19,"index":42}},
61 "declarations": [
62 {
63 "type": "VariableDeclarator",
64 "start":40,"end":41,"loc":{"start":{"line":3,"column":17,"index":40},"end":{"line":3,"column":18,"index":41}},
65 "id": {
66 "type": "Identifier",
67 "start":40,"end":41,"loc":{"start":{"line":3,"column":17,"index":40},"end":{"line":3,"column":18,"index":41},"identifierName":"b"},
68 "name": "b"
69 },
70 "init": null
71 }
72 ],
73 "kind": "using"
74 }
75 },
76 {
77 "type": "DoWhileStatement",
78 "start":45,"end":67,"loc":{"start":{"line":4,"column":2,"index":45},"end":{"line":4,"column":24,"index":67}},
79 "body": {
80 "type": "VariableDeclaration",
81 "start":48,"end":56,"loc":{"start":{"line":4,"column":5,"index":48},"end":{"line":4,"column":13,"index":56}},
82 "declarations": [
83 {
84 "type": "VariableDeclarator",
85 "start":54,"end":55,"loc":{"start":{"line":4,"column":11,"index":54},"end":{"line":4,"column":12,"index":55}},
86 "id": {
87 "type": "Identifier",
88 "start":54,"end":55,"loc":{"start":{"line":4,"column":11,"index":54},"end":{"line":4,"column":12,"index":55},"identifierName":"c"},
89 "name": "c"
90 },
91 "init": null
92 }
93 ],
94 "kind": "using"
95 },
96 "test": {
97 "type": "NumericLiteral",
98 "start":64,"end":65,"loc":{"start":{"line":4,"column":21,"index":64},"end":{"line":4,"column":22,"index":65}},
99 "extra": {
100 "rawValue": 1,
101 "raw": "1"
102 },
103 "value": 1
104 }
105 },
106 {
107 "type": "IfStatement",
108 "start":70,"end":85,"loc":{"start":{"line":5,"column":2,"index":70},"end":{"line":5,"column":17,"index":85}},
109 "test": {
110 "type": "NumericLiteral",
111 "start":74,"end":75,"loc":{"start":{"line":5,"column":6,"index":74},"end":{"line":5,"column":7,"index":75}},
112 "extra": {
113 "rawValue": 1,
114 "raw": "1"
115 },
116 "value": 1
117 },
118 "consequent": {
119 "type": "VariableDeclaration",
120 "start":77,"end":85,"loc":{"start":{"line":5,"column":9,"index":77},"end":{"line":5,"column":17,"index":85}},
121 "declarations": [
122 {
123 "type": "VariableDeclarator",
124 "start":83,"end":84,"loc":{"start":{"line":5,"column":15,"index":83},"end":{"line":5,"column":16,"index":84}},
125 "id": {
126 "type": "Identifier",
127 "start":83,"end":84,"loc":{"start":{"line":5,"column":15,"index":83},"end":{"line":5,"column":16,"index":84},"identifierName":"d"},
128 "name": "d"
129 },
130 "init": null
131 }
132 ],
133 "kind": "using"
134 },
135 "alternate": null
136 },
137 {
138 "type": "WithStatement",
139 "start":88,"end":105,"loc":{"start":{"line":6,"column":2,"index":88},"end":{"line":6,"column":19,"index":105}},
140 "object": {
141 "type": "NumericLiteral",
142 "start":94,"end":95,"loc":{"start":{"line":6,"column":8,"index":94},"end":{"line":6,"column":9,"index":95}},
143 "extra": {
144 "rawValue": 1,
145 "raw": "1"
146 },
147 "value": 1
148 },
149 "body": {
150 "type": "VariableDeclaration",
151 "start":97,"end":105,"loc":{"start":{"line":6,"column":11,"index":97},"end":{"line":6,"column":19,"index":105}},
152 "declarations": [
153 {
154 "type": "VariableDeclarator",
155 "start":103,"end":104,"loc":{"start":{"line":6,"column":17,"index":103},"end":{"line":6,"column":18,"index":104}},
156 "id": {
157 "type": "Identifier",
158 "start":103,"end":104,"loc":{"start":{"line":6,"column":17,"index":103},"end":{"line":6,"column":18,"index":104},"identifierName":"e"},
159 "name": "e"
160 },
161 "init": null
162 }
163 ],
164 "kind": "using"
165 }
166 },
167 {
168 "type": "LabeledStatement",
169 "start":108,"end":123,"loc":{"start":{"line":7,"column":2,"index":108},"end":{"line":7,"column":17,"index":123}},
170 "body": {
171 "type": "VariableDeclaration",
172 "start":115,"end":123,"loc":{"start":{"line":7,"column":9,"index":115},"end":{"line":7,"column":17,"index":123}},
173 "declarations": [
174 {
175 "type": "VariableDeclarator",
176 "start":121,"end":122,"loc":{"start":{"line":7,"column":15,"index":121},"end":{"line":7,"column":16,"index":122}},
177 "id": {
178 "type": "Identifier",
179 "start":121,"end":122,"loc":{"start":{"line":7,"column":15,"index":121},"end":{"line":7,"column":16,"index":122},"identifierName":"f"},
180 "name": "f"
181 },
182 "init": null
183 }
184 ],
185 "kind": "using"
186 },
187 "label": {
188 "type": "Identifier",
189 "start":108,"end":113,"loc":{"start":{"line":7,"column":2,"index":108},"end":{"line":7,"column":7,"index":113},"identifierName":"label"},
190 "name": "label"
191 }
192 }
193 ],
194 "directives": []
195 }
196 ],
197 "directives": []
198 }
199 }