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

225 lines
5.8 KiB
JSON

{
"type": "File",
"start": 0,
"end": 39,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 39
}
},
"program": {
"type": "Program",
"start": 0,
"end": 39,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 39
}
},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 39,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 39
}
},
"expression": {
"type": "ArrowFunctionExpression",
"start": 0,
"end": 38,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 38
}
},
"id": null,
"generator": false,
"async": true,
"params": [
{
"type": "AssignmentPattern",
"start": 7,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 31
}
},
"left": {
"type": "Identifier",
"start": 7,
"end": 8,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 8
},
"identifierName": "a"
},
"name": "a"
},
"right": {
"type": "ArrowFunctionExpression",
"start": 11,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 11
},
"end": {
"line": 1,
"column": 31
}
},
"id": null,
"generator": false,
"async": false,
"params": [
{
"type": "ObjectPattern",
"start": 12,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 12
},
"end": {
"line": 1,
"column": 24
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 14,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 14
},
"end": {
"line": 1,
"column": 22
}
},
"method": false,
"key": {
"type": "Identifier",
"start": 14,
"end": 19,
"loc": {
"start": {
"line": 1,
"column": 14
},
"end": {
"line": 1,
"column": 19
},
"identifierName": "await"
},
"name": "await"
},
"computed": false,
"shorthand": false,
"value": {
"type": "Identifier",
"start": 21,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 21
},
"end": {
"line": 1,
"column": 22
},
"identifierName": "x"
},
"name": "x"
}
}
]
}
],
"body": {
"type": "BlockStatement",
"start": 29,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 29
},
"end": {
"line": 1,
"column": 31
}
},
"body": [],
"directives": []
}
}
}
],
"body": {
"type": "BlockStatement",
"start": 36,
"end": 38,
"loc": {
"start": {
"line": 1,
"column": 36
},
"end": {
"line": 1,
"column": 38
}
},
"body": [],
"directives": []
}
}
}
],
"directives": []
}
}