77 lines
2.9 KiB
JSON
77 lines
2.9 KiB
JSON
{
|
|
"type": "File",
|
|
"start":0,"end":55,"loc":{"start":{"line":1,"column":0},"end":{"line":3,"column":1}},
|
|
"errors": [
|
|
"SyntaxError: 'await' is only allowed within async functions (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},"end":{"line":3,"column":1}},
|
|
"sourceType": "script",
|
|
"interpreter": null,
|
|
"body": [
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"start":0,"end":55,"loc":{"start":{"line":1,"column":0},"end":{"line":3,"column":1}},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"start":15,"end":18,"loc":{"start":{"line":1,"column":15},"end":{"line":1,"column":18},"identifierName":"foo"},
|
|
"name": "foo"
|
|
},
|
|
"generator": false,
|
|
"async": true,
|
|
"params": [],
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"start":21,"end":55,"loc":{"start":{"line":1,"column":21},"end":{"line":3,"column":1}},
|
|
"body": [
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"start":25,"end":53,"loc":{"start":{"line":2,"column":2},"end":{"line":2,"column":30}},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"start":34,"end":37,"loc":{"start":{"line":2,"column":11},"end":{"line":2,"column":14},"identifierName":"bar"},
|
|
"name": "bar"
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"params": [
|
|
{
|
|
"type": "AssignmentPattern",
|
|
"start":38,"end":49,"loc":{"start":{"line":2,"column":15},"end":{"line":2,"column":26}},
|
|
"left": {
|
|
"type": "Identifier",
|
|
"start":38,"end":39,"loc":{"start":{"line":2,"column":15},"end":{"line":2,"column":16},"identifierName":"x"},
|
|
"name": "x"
|
|
},
|
|
"right": {
|
|
"type": "AwaitExpression",
|
|
"start":42,"end":49,"loc":{"start":{"line":2,"column":19},"end":{"line":2,"column":26}},
|
|
"argument": {
|
|
"type": "NumericLiteral",
|
|
"start":48,"end":49,"loc":{"start":{"line":2,"column":25},"end":{"line":2,"column":26}},
|
|
"extra": {
|
|
"rawValue": 2,
|
|
"raw": "2"
|
|
},
|
|
"value": 2
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"start":51,"end":53,"loc":{"start":{"line":2,"column":28},"end":{"line":2,"column":30}},
|
|
"body": [],
|
|
"directives": []
|
|
}
|
|
}
|
|
],
|
|
"directives": []
|
|
}
|
|
}
|
|
],
|
|
"directives": []
|
|
}
|
|
} |