{ "type": "File", "start":0,"end":33,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":33,"index":33}}, "errors": [ "SyntaxError: Async functions can only be declared at the top level or inside a block. (1:10)" ], "program": { "type": "Program", "start":0,"end":33,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":33,"index":33}}, "sourceType": "script", "interpreter": null, "body": [ { "type": "WhileStatement", "start":0,"end":33,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":33,"index":33}}, "test": { "type": "NumericLiteral", "start":7,"end":8,"loc":{"start":{"line":1,"column":7,"index":7},"end":{"line":1,"column":8,"index":8}}, "extra": { "rawValue": 1, "raw": "1" }, "value": 1 }, "body": { "type": "FunctionDeclaration", "start":10,"end":33,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":1,"column":33,"index":33}}, "id": { "type": "Identifier", "start":26,"end":29,"loc":{"start":{"line":1,"column":26,"index":26},"end":{"line":1,"column":29,"index":29},"identifierName":"foo"}, "name": "foo" }, "generator": true, "async": true, "params": [], "body": { "type": "BlockStatement", "start":31,"end":33,"loc":{"start":{"line":1,"column":31,"index":31},"end":{"line":1,"column":33,"index":33}}, "body": [], "directives": [] } } } ], "directives": [] } }