Debian Codegraph @

packages/babel-parser/test/fixtures/es2017/async-functions/allow-await-outside-function-throw/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":33,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":33}},
4 "errors": [
5 "SyntaxError: 'await' is only allowed within async functions and at the top levels of modules. (2:9)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":33,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":33}},
10 "sourceType": "script",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "FunctionDeclaration",
15 "start":0,"end":33,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":33}},
16 "id": {
17 "type": "Identifier",
18 "start":9,"end":10,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":10,"index":10},"identifierName":"a"},
19 "name": "a"
20 },
21 "generator": false,
22 "async": false,
23 "params": [],
24 "body": {
25 "type": "BlockStatement",
26 "start":13,"end":33,"loc":{"start":{"line":1,"column":13,"index":13},"end":{"line":3,"column":1,"index":33}},
27 "body": [
28 {
29 "type": "ReturnStatement",
30 "start":17,"end":31,"loc":{"start":{"line":2,"column":2,"index":17},"end":{"line":2,"column":16,"index":31}},
31 "argument": {
32 "type": "AwaitExpression",
33 "start":24,"end":31,"loc":{"start":{"line":2,"column":9,"index":24},"end":{"line":2,"column":16,"index":31}},
34 "argument": {
35 "type": "NumericLiteral",
36 "start":30,"end":31,"loc":{"start":{"line":2,"column":15,"index":30},"end":{"line":2,"column":16,"index":31}},
37 "extra": {
38 "rawValue": 1,
39 "raw": "1"
40 },
41 "value": 1
42 }
43 }
44 }
45 ],
46 "directives": []
47 }
48 }
49 ],
50 "directives": []
51 }
52 }