Debian Codegraph @

packages/babel-parser/test/fixtures/experimental/explicit-resource-management/invalid-using-binding-await-script/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":113,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":12,"column":1,"index":113}},
4 "errors": [
5 "SyntaxError: 'await' is not allowed to be used as a name in 'using' declarations. (2:8)",
6 "SyntaxError: 'await' is not allowed to be used as a name in 'using' declarations. (5:8)",
7 "SyntaxError: 'await' is not allowed to be used as a name in 'using' declarations. (8:11)",
8 "SyntaxError: 'await' is not allowed to be used as a name in 'using' declarations. (11:13)"
9 ],
10 "program": {
11 "type": "Program",
12 "start":0,"end":113,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":12,"column":1,"index":113}},
13 "sourceType": "script",
14 "interpreter": null,
15 "body": [
16 {
17 "type": "BlockStatement",
18 "start":0,"end":24,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":24}},
19 "body": [
20 {
21 "type": "VariableDeclaration",
22 "start":4,"end":22,"loc":{"start":{"line":2,"column":2,"index":4},"end":{"line":2,"column":20,"index":22}},
23 "declarations": [
24 {
25 "type": "VariableDeclarator",
26 "start":10,"end":21,"loc":{"start":{"line":2,"column":8,"index":10},"end":{"line":2,"column":19,"index":21}},
27 "id": {
28 "type": "Identifier",
29 "start":10,"end":15,"loc":{"start":{"line":2,"column":8,"index":10},"end":{"line":2,"column":13,"index":15},"identifierName":"await"},
30 "name": "await"
31 },
32 "init": {
33 "type": "CallExpression",
34 "start":18,"end":21,"loc":{"start":{"line":2,"column":16,"index":18},"end":{"line":2,"column":19,"index":21}},
35 "callee": {
36 "type": "Identifier",
37 "start":18,"end":19,"loc":{"start":{"line":2,"column":16,"index":18},"end":{"line":2,"column":17,"index":19},"identifierName":"h"},
38 "name": "h"
39 },
40 "arguments": []
41 }
42 }
43 ],
44 "kind": "using"
45 }
46 ],
47 "directives": []
48 },
49 {
50 "type": "BlockStatement",
51 "start":25,"end":54,"loc":{"start":{"line":4,"column":0,"index":25},"end":{"line":6,"column":1,"index":54}},
52 "body": [
53 {
54 "type": "VariableDeclaration",
55 "start":29,"end":52,"loc":{"start":{"line":5,"column":2,"index":29},"end":{"line":5,"column":25,"index":52}},
56 "declarations": [
57 {
58 "type": "VariableDeclarator",
59 "start":35,"end":51,"loc":{"start":{"line":5,"column":8,"index":35},"end":{"line":5,"column":24,"index":51}},
60 "id": {
61 "type": "Identifier",
62 "start":35,"end":45,"loc":{"start":{"line":5,"column":8,"index":35},"end":{"line":5,"column":18,"index":45},"identifierName":"await"},
63 "name": "await"
64 },
65 "init": {
66 "type": "CallExpression",
67 "start":48,"end":51,"loc":{"start":{"line":5,"column":21,"index":48},"end":{"line":5,"column":24,"index":51}},
68 "callee": {
69 "type": "Identifier",
70 "start":48,"end":49,"loc":{"start":{"line":5,"column":21,"index":48},"end":{"line":5,"column":22,"index":49},"identifierName":"h"},
71 "name": "h"
72 },
73 "arguments": []
74 }
75 }
76 ],
77 "kind": "using"
78 }
79 ],
80 "directives": []
81 },
82 {
83 "type": "BlockStatement",
84 "start":55,"end":82,"loc":{"start":{"line":7,"column":0,"index":55},"end":{"line":9,"column":1,"index":82}},
85 "body": [
86 {
87 "type": "VariableDeclaration",
88 "start":59,"end":80,"loc":{"start":{"line":8,"column":2,"index":59},"end":{"line":8,"column":23,"index":80}},
89 "declarations": [
90 {
91 "type": "VariableDeclarator",
92 "start":65,"end":66,"loc":{"start":{"line":8,"column":8,"index":65},"end":{"line":8,"column":9,"index":66}},
93 "id": {
94 "type": "Identifier",
95 "start":65,"end":66,"loc":{"start":{"line":8,"column":8,"index":65},"end":{"line":8,"column":9,"index":66},"identifierName":"x"},
96 "name": "x"
97 },
98 "init": null
99 },
100 {
101 "type": "VariableDeclarator",
102 "start":68,"end":79,"loc":{"start":{"line":8,"column":11,"index":68},"end":{"line":8,"column":22,"index":79}},
103 "id": {
104 "type": "Identifier",
105 "start":68,"end":73,"loc":{"start":{"line":8,"column":11,"index":68},"end":{"line":8,"column":16,"index":73},"identifierName":"await"},
106 "name": "await"
107 },
108 "init": {
109 "type": "CallExpression",
110 "start":76,"end":79,"loc":{"start":{"line":8,"column":19,"index":76},"end":{"line":8,"column":22,"index":79}},
111 "callee": {
112 "type": "Identifier",
113 "start":76,"end":77,"loc":{"start":{"line":8,"column":19,"index":76},"end":{"line":8,"column":20,"index":77},"identifierName":"h"},
114 "name": "h"
115 },
116 "arguments": []
117 }
118 }
119 ],
120 "kind": "using"
121 }
122 ],
123 "directives": []
124 },
125 {
126 "type": "BlockStatement",
127 "start":83,"end":113,"loc":{"start":{"line":10,"column":0,"index":83},"end":{"line":12,"column":1,"index":113}},
128 "body": [
129 {
130 "type": "ForOfStatement",
131 "start":87,"end":111,"loc":{"start":{"line":11,"column":2,"index":87},"end":{"line":11,"column":26,"index":111}},
132 "await": false,
133 "left": {
134 "type": "VariableDeclaration",
135 "start":92,"end":103,"loc":{"start":{"line":11,"column":7,"index":92},"end":{"line":11,"column":18,"index":103}},
136 "declarations": [
137 {
138 "type": "VariableDeclarator",
139 "start":98,"end":103,"loc":{"start":{"line":11,"column":13,"index":98},"end":{"line":11,"column":18,"index":103}},
140 "id": {
141 "type": "Identifier",
142 "start":98,"end":103,"loc":{"start":{"line":11,"column":13,"index":98},"end":{"line":11,"column":18,"index":103},"identifierName":"await"},
143 "name": "await"
144 },
145 "init": null
146 }
147 ],
148 "kind": "using"
149 },
150 "right": {
151 "type": "ArrayExpression",
152 "start":107,"end":109,"loc":{"start":{"line":11,"column":22,"index":107},"end":{"line":11,"column":24,"index":109}},
153 "elements": []
154 },
155 "body": {
156 "type": "EmptyStatement",
157 "start":110,"end":111,"loc":{"start":{"line":11,"column":25,"index":110},"end":{"line":11,"column":26,"index":111}}
158 }
159 }
160 ],
161 "directives": []
162 }
163 ],
164 "directives": []
165 }
166 }