* 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>
42 lines
1.4 KiB
JSON
42 lines
1.4 KiB
JSON
{
|
|
"type": "File",
|
|
"start":0,"end":20,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":20}},
|
|
"errors": [
|
|
"SyntaxError: 'await' is only allowed within async functions (1:6)"
|
|
],
|
|
"program": {
|
|
"type": "Program",
|
|
"start":0,"end":20,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":20}},
|
|
"sourceType": "module",
|
|
"interpreter": null,
|
|
"body": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"start":0,"end":20,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":20}},
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"start":6,"end":19,"loc":{"start":{"line":1,"column":6},"end":{"line":1,"column":19}},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"start":6,"end":11,"loc":{"start":{"line":1,"column":6},"end":{"line":1,"column":11},"identifierName":"await"},
|
|
"name": "await"
|
|
},
|
|
"init": {
|
|
"type": "CallExpression",
|
|
"start":14,"end":19,"loc":{"start":{"line":1,"column":14},"end":{"line":1,"column":19}},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"start":14,"end":17,"loc":{"start":{"line":1,"column":14},"end":{"line":1,"column":17},"identifierName":"foo"},
|
|
"name": "foo"
|
|
},
|
|
"arguments": []
|
|
}
|
|
}
|
|
],
|
|
"kind": "const"
|
|
}
|
|
],
|
|
"directives": []
|
|
}
|
|
} |