* polish: update AwaitNotInAsyncFunction message * polish: update YieldInParameter error message * Apply suggestions from code review Co-authored-by: Brian Ng <bng412@gmail.com> * update test fixtures Co-authored-by: Brian Ng <bng412@gmail.com>
34 lines
1.0 KiB
JSON
34 lines
1.0 KiB
JSON
{
|
|
"type": "File",
|
|
"start":0,"end":19,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":19}},
|
|
"errors": [
|
|
"SyntaxError: 'await' is only allowed within async functions (1:9)"
|
|
],
|
|
"program": {
|
|
"type": "Program",
|
|
"start":0,"end":19,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":19}},
|
|
"sourceType": "module",
|
|
"interpreter": null,
|
|
"body": [
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"start":0,"end":19,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":19}},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"start":9,"end":14,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":14},"identifierName":"await"},
|
|
"name": "await"
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"params": [],
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"start":17,"end":19,"loc":{"start":{"line":1,"column":17},"end":{"line":1,"column":19}},
|
|
"body": [],
|
|
"directives": []
|
|
}
|
|
}
|
|
],
|
|
"directives": []
|
|
}
|
|
} |