| 1 |
{ |
| 2 |
"type": "File", |
| 3 |
"start":0,"end":55,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":55}}, |
| 4 |
"errors": [ |
| 5 |
"SyntaxError: 'await' is only allowed within async functions and at the top levels of modules. (2:19)", |
| 6 |
"SyntaxError: 'await' is not allowed in async function parameters. (2:19)" |
| 7 |
], |
| 8 |
"program": { |
| 9 |
"type": "Program", |
| 10 |
"start":0,"end":55,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":55}}, |
| 11 |
"sourceType": "script", |
| 12 |
"interpreter": null, |
| 13 |
"body": [ |
| 14 |
{ |
| 15 |
"type": "FunctionDeclaration", |
| 16 |
"start":0,"end":55,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":55}}, |
| 17 |
"id": { |
| 18 |
"type": "Identifier", |
| 19 |
"start":15,"end":18,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":1,"column":18,"index":18},"identifierName":"foo"}, |
| 20 |
"name": "foo" |
| 21 |
}, |
| 22 |
"generator": false, |
| 23 |
"async": true, |
| 24 |
"params": [], |
| 25 |
"body": { |
| 26 |
"type": "BlockStatement", |
| 27 |
"start":21,"end":55,"loc":{"start":{"line":1,"column":21,"index":21},"end":{"line":3,"column":1,"index":55}}, |
| 28 |
"body": [ |
| 29 |
{ |
| 30 |
"type": "FunctionDeclaration", |
| 31 |
"start":25,"end":53,"loc":{"start":{"line":2,"column":2,"index":25},"end":{"line":2,"column":30,"index":53}}, |
| 32 |
"id": { |
| 33 |
"type": "Identifier", |
| 34 |
"start":34,"end":37,"loc":{"start":{"line":2,"column":11,"index":34},"end":{"line":2,"column":14,"index":37},"identifierName":"bar"}, |
| 35 |
"name": "bar" |
| 36 |
}, |
| 37 |
"generator": false, |
| 38 |
"async": false, |
| 39 |
"params": [ |
| 40 |
{ |
| 41 |
"type": "AssignmentPattern", |
| 42 |
"start":38,"end":49,"loc":{"start":{"line":2,"column":15,"index":38},"end":{"line":2,"column":26,"index":49}}, |
| 43 |
"left": { |
| 44 |
"type": "Identifier", |
| 45 |
"start":38,"end":39,"loc":{"start":{"line":2,"column":15,"index":38},"end":{"line":2,"column":16,"index":39},"identifierName":"x"}, |
| 46 |
"name": "x" |
| 47 |
}, |
| 48 |
"right": { |
| 49 |
"type": "AwaitExpression", |
| 50 |
"start":42,"end":49,"loc":{"start":{"line":2,"column":19,"index":42},"end":{"line":2,"column":26,"index":49}}, |
| 51 |
"argument": { |
| 52 |
"type": "NumericLiteral", |
| 53 |
"start":48,"end":49,"loc":{"start":{"line":2,"column":25,"index":48},"end":{"line":2,"column":26,"index":49}}, |
| 54 |
"extra": { |
| 55 |
"rawValue": 2, |
| 56 |
"raw": "2" |
| 57 |
}, |
| 58 |
"value": 2 |
| 59 |
} |
| 60 |
} |
| 61 |
} |
| 62 |
], |
| 63 |
"body": { |
| 64 |
"type": "BlockStatement", |
| 65 |
"start":51,"end":53,"loc":{"start":{"line":2,"column":28,"index":51},"end":{"line":2,"column":30,"index":53}}, |
| 66 |
"body": [], |
| 67 |
"directives": [] |
| 68 |
} |
| 69 |
} |
| 70 |
], |
| 71 |
"directives": [] |
| 72 |
} |
| 73 |
} |
| 74 |
], |
| 75 |
"directives": [] |
| 76 |
} |
| 77 |
} |