{ "type": "File", "start":0,"end":55,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":55}}, "errors": [ "SyntaxError: 'await' is only allowed within async functions and at the top levels of modules. (2:19)", "SyntaxError: 'await' is not allowed in async function parameters. (2:19)" ], "program": { "type": "Program", "start":0,"end":55,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":55}}, "sourceType": "script", "interpreter": null, "body": [ { "type": "FunctionDeclaration", "start":0,"end":55,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":55}}, "id": { "type": "Identifier", "start":15,"end":18,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":1,"column":18,"index":18},"identifierName":"foo"}, "name": "foo" }, "generator": false, "async": true, "params": [], "body": { "type": "BlockStatement", "start":21,"end":55,"loc":{"start":{"line":1,"column":21,"index":21},"end":{"line":3,"column":1,"index":55}}, "body": [ { "type": "FunctionDeclaration", "start":25,"end":53,"loc":{"start":{"line":2,"column":2,"index":25},"end":{"line":2,"column":30,"index":53}}, "id": { "type": "Identifier", "start":34,"end":37,"loc":{"start":{"line":2,"column":11,"index":34},"end":{"line":2,"column":14,"index":37},"identifierName":"bar"}, "name": "bar" }, "generator": false, "async": false, "params": [ { "type": "AssignmentPattern", "start":38,"end":49,"loc":{"start":{"line":2,"column":15,"index":38},"end":{"line":2,"column":26,"index":49}}, "left": { "type": "Identifier", "start":38,"end":39,"loc":{"start":{"line":2,"column":15,"index":38},"end":{"line":2,"column":16,"index":39},"identifierName":"x"}, "name": "x" }, "right": { "type": "AwaitExpression", "start":42,"end":49,"loc":{"start":{"line":2,"column":19,"index":42},"end":{"line":2,"column":26,"index":49}}, "argument": { "type": "NumericLiteral", "start":48,"end":49,"loc":{"start":{"line":2,"column":25,"index":48},"end":{"line":2,"column":26,"index":49}}, "extra": { "rawValue": 2, "raw": "2" }, "value": 2 } } } ], "body": { "type": "BlockStatement", "start":51,"end":53,"loc":{"start":{"line":2,"column":28,"index":51},"end":{"line":2,"column":30,"index":53}}, "body": [], "directives": [] } } ], "directives": [] } } ], "directives": [] } }