Nicolò Ribaudo a219b6de7a
Disallow await inside async arrow params (#10469)
* Disallow await inside async arrow params

* Use -1 as default for awaitPos/yieldPos
2019-10-02 07:37:40 +02:00

224 lines
5.6 KiB
JSON

{
"type": "File",
"start": 0,
"end": 56,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 3,
"column": 1
}
},
"program": {
"type": "Program",
"start": 0,
"end": 56,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 3,
"column": 1
}
},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "FunctionDeclaration",
"start": 0,
"end": 56,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 3,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 15,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 15
},
"end": {
"line": 1,
"column": 16
},
"identifierName": "f"
},
"name": "f"
},
"generator": false,
"async": true,
"params": [],
"body": {
"type": "BlockStatement",
"start": 19,
"end": 56,
"loc": {
"start": {
"line": 1,
"column": 19
},
"end": {
"line": 3,
"column": 1
}
},
"body": [
{
"type": "FunctionDeclaration",
"start": 23,
"end": 54,
"loc": {
"start": {
"line": 2,
"column": 2
},
"end": {
"line": 2,
"column": 33
}
},
"id": {
"type": "Identifier",
"start": 32,
"end": 33,
"loc": {
"start": {
"line": 2,
"column": 11
},
"end": {
"line": 2,
"column": 12
},
"identifierName": "g"
},
"name": "g"
},
"generator": false,
"async": false,
"params": [
{
"type": "AssignmentPattern",
"start": 34,
"end": 50,
"loc": {
"start": {
"line": 2,
"column": 13
},
"end": {
"line": 2,
"column": 29
}
},
"left": {
"type": "Identifier",
"start": 34,
"end": 35,
"loc": {
"start": {
"line": 2,
"column": 13
},
"end": {
"line": 2,
"column": 14
},
"identifierName": "x"
},
"name": "x"
},
"right": {
"type": "CallExpression",
"start": 38,
"end": 50,
"loc": {
"start": {
"line": 2,
"column": 17
},
"end": {
"line": 2,
"column": 29
}
},
"callee": {
"type": "Identifier",
"start": 38,
"end": 43,
"loc": {
"start": {
"line": 2,
"column": 17
},
"end": {
"line": 2,
"column": 22
},
"identifierName": "async"
},
"name": "async"
},
"arguments": [
{
"type": "Identifier",
"start": 44,
"end": 49,
"loc": {
"start": {
"line": 2,
"column": 23
},
"end": {
"line": 2,
"column": 28
},
"identifierName": "await"
},
"name": "await"
}
]
}
}
],
"body": {
"type": "BlockStatement",
"start": 52,
"end": 54,
"loc": {
"start": {
"line": 2,
"column": 31
},
"end": {
"line": 2,
"column": 33
}
},
"body": [],
"directives": []
}
}
],
"directives": []
}
}
],
"directives": []
}
}