54 lines
1.9 KiB
JSON
54 lines
1.9 KiB
JSON
{
|
|
"type": "File",
|
|
"start":0,"end":40,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":40}},
|
|
"errors": [
|
|
"SyntaxError: 'await' is only allowed within async functions (1:24)"
|
|
],
|
|
"program": {
|
|
"type": "Program",
|
|
"start":0,"end":40,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":40}},
|
|
"sourceType": "script",
|
|
"interpreter": null,
|
|
"body": [
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"start":0,"end":40,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":40}},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"start":9,"end":12,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":12},"identifierName":"foo"},
|
|
"name": "foo"
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"params": [
|
|
{
|
|
"type": "Identifier",
|
|
"start":13,"end":20,"loc":{"start":{"line":1,"column":13},"end":{"line":1,"column":20},"identifierName":"promise"},
|
|
"name": "promise"
|
|
}
|
|
],
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"start":22,"end":40,"loc":{"start":{"line":1,"column":22},"end":{"line":1,"column":40}},
|
|
"body": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"start":24,"end":38,"loc":{"start":{"line":1,"column":24},"end":{"line":1,"column":38}},
|
|
"expression": {
|
|
"type": "AwaitExpression",
|
|
"start":24,"end":37,"loc":{"start":{"line":1,"column":24},"end":{"line":1,"column":37}},
|
|
"argument": {
|
|
"type": "Identifier",
|
|
"start":30,"end":37,"loc":{"start":{"line":1,"column":30},"end":{"line":1,"column":37},"identifierName":"promise"},
|
|
"name": "promise"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"directives": []
|
|
}
|
|
}
|
|
],
|
|
"directives": []
|
|
}
|
|
} |