Files

67 lines
2.8 KiB
JSON

{
"type": "File",
"start":0,"end":35,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":35}},
"errors": [
"SyntaxError: 'await' is only allowed within async functions and at the top levels of modules. (2:2)"
],
"program": {
"type": "Program",
"start":0,"end":35,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":35}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "FunctionDeclaration",
"start":0,"end":35,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":35}},
"id": {
"type": "Identifier",
"start":9,"end":12,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":12,"index":12},"identifierName":"foo"},
"name": "foo"
},
"generator": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start":15,"end":35,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":3,"column":1,"index":35}},
"body": [
{
"type": "ExpressionStatement",
"start":19,"end":33,"loc":{"start":{"line":2,"column":2,"index":19},"end":{"line":2,"column":16,"index":33}},
"expression": {
"type": "AwaitExpression",
"start":19,"end":32,"loc":{"start":{"line":2,"column":2,"index":19},"end":{"line":2,"column":15,"index":32}},
"argument": {
"type": "ObjectExpression",
"start":25,"end":32,"loc":{"start":{"line":2,"column":8,"index":25},"end":{"line":2,"column":15,"index":32}},
"properties": [
{
"type": "ObjectProperty",
"start":27,"end":30,"loc":{"start":{"line":2,"column":10,"index":27},"end":{"line":2,"column":13,"index":30}},
"method": false,
"key": {
"type": "Identifier",
"start":27,"end":30,"loc":{"start":{"line":2,"column":10,"index":27},"end":{"line":2,"column":13,"index":30},"identifierName":"foo"},
"name": "foo"
},
"computed": false,
"shorthand": true,
"value": {
"type": "Identifier",
"start":27,"end":30,"loc":{"start":{"line":2,"column":10,"index":27},"end":{"line":2,"column":13,"index":30},"identifierName":"foo"},
"name": "foo"
}
}
]
}
}
}
],
"directives": []
}
}
],
"directives": []
}
}