* fix: incomplete ParamKind declaration * refactor: add expression scope handler * test: update test262 allowlist * chore: cleanup * fix: push expression scope for function body * fix: push new expression scope for initializer and static block * test: add more test cases * fix flow error * refactor: remove unecessary expression scope * fix: parameter initializer error should not cross expression scope boundary * chore: cleanup outdated comments * fix: do not record async arrow error on ParameterDeclaration * Update packages/babel-parser/src/util/expression-scope.js Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com> * polish: clear ancestry declaration error on validate Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
72 lines
2.8 KiB
JSON
72 lines
2.8 KiB
JSON
{
|
|
"type": "File",
|
|
"start":0,"end":41,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":41}},
|
|
"program": {
|
|
"type": "Program",
|
|
"start":0,"end":41,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":41}},
|
|
"sourceType": "script",
|
|
"interpreter": null,
|
|
"body": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"start":0,"end":41,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":41}},
|
|
"expression": {
|
|
"type": "CallExpression",
|
|
"start":0,"end":40,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":40}},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"start":0,"end":5,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":5},"identifierName":"async"},
|
|
"name": "async"
|
|
},
|
|
"arguments": [
|
|
{
|
|
"type": "AssignmentExpression",
|
|
"start":8,"end":38,"loc":{"start":{"line":1,"column":8},"end":{"line":1,"column":38}},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"start":8,"end":9,"loc":{"start":{"line":1,"column":8},"end":{"line":1,"column":9},"identifierName":"x"},
|
|
"name": "x"
|
|
},
|
|
"right": {
|
|
"type": "ArrowFunctionExpression",
|
|
"start":12,"end":38,"loc":{"start":{"line":1,"column":12},"end":{"line":1,"column":38}},
|
|
"id": null,
|
|
"generator": false,
|
|
"async": false,
|
|
"params": [
|
|
{
|
|
"type": "Identifier",
|
|
"start":13,"end":18,"loc":{"start":{"line":1,"column":13},"end":{"line":1,"column":18},"identifierName":"await"},
|
|
"name": "await"
|
|
}
|
|
],
|
|
"body": {
|
|
"type": "ArrowFunctionExpression",
|
|
"start":23,"end":38,"loc":{"start":{"line":1,"column":23},"end":{"line":1,"column":38}},
|
|
"id": null,
|
|
"generator": false,
|
|
"async": true,
|
|
"params": [
|
|
{
|
|
"type": "Identifier",
|
|
"start":30,"end":31,"loc":{"start":{"line":1,"column":30},"end":{"line":1,"column":31},"identifierName":"y"},
|
|
"name": "y"
|
|
}
|
|
],
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"start":36,"end":38,"loc":{"start":{"line":1,"column":36},"end":{"line":1,"column":38}},
|
|
"body": [],
|
|
"directives": []
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"directives": []
|
|
}
|
|
} |