Debian Codegraph @

packages/babel-parser/test/fixtures/es2017/async-functions/9/output.json

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