Debian Codegraph @

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

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