Debian Codegraph @

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

raw
1 {
2 "type": "File",
3 "start":0,"end":23,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":23,"index":23}},
4 "errors": [
5 "SyntaxError: Using declaration cannot appear in the top level when source type is `script`. (1:7)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":23,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":23,"index":23}},
10 "sourceType": "script",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "LabeledStatement",
15 "start":0,"end":23,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":23,"index":23}},
16 "body": {
17 "type": "VariableDeclaration",
18 "start":7,"end":23,"loc":{"start":{"line":1,"column":7,"index":7},"end":{"line":1,"column":23,"index":23}},
19 "declarations": [
20 {
21 "type": "VariableDeclarator",
22 "start":13,"end":22,"loc":{"start":{"line":1,"column":13,"index":13},"end":{"line":1,"column":22,"index":22}},
23 "id": {
24 "type": "Identifier",
25 "start":13,"end":14,"loc":{"start":{"line":1,"column":13,"index":13},"end":{"line":1,"column":14,"index":14},"identifierName":"x"},
26 "name": "x"
27 },
28 "init": {
29 "type": "CallExpression",
30 "start":17,"end":22,"loc":{"start":{"line":1,"column":17,"index":17},"end":{"line":1,"column":22,"index":22}},
31 "callee": {
32 "type": "Identifier",
33 "start":17,"end":20,"loc":{"start":{"line":1,"column":17,"index":17},"end":{"line":1,"column":20,"index":20},"identifierName":"bar"},
34 "name": "bar"
35 },
36 "arguments": []
37 }
38 }
39 ],
40 "kind": "using"
41 },
42 "label": {
43 "type": "Identifier",
44 "start":0,"end":5,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":5,"index":5},"identifierName":"label"},
45 "name": "label"
46 }
47 }
48 ],
49 "directives": []
50 }
51 }