Files
Huáng JùnliàngandGitHub 2d557f5b3e Materialize explicitResourceManagement parser plugin (#17346)
* feat: materialize explicitResourceManagement plugin

* remove explicitResourceManagement from parser option schema

* remove no plugin tests

* move parser tests to es2026

* remove explicitResourceManagement parser option usage

* add missing options.json

* remove explicitResourceManagement from prettier Babel parser config

* fix rebase error

* add failed typescript test
2025-06-29 22:34:30 +02:00

148 lines
7.0 KiB
JSON

{
"type": "File",
"start":0,"end":130,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":9,"column":1,"index":130}},
"errors": [
"SyntaxError: Identifier 'f' has already been declared. (3:27)",
"SyntaxError: Identifier 'g' has already been declared. (7:16)"
],
"program": {
"type": "Program",
"start":0,"end":130,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":9,"column":1,"index":130}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "FunctionDeclaration",
"start":0,"end":130,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":9,"column":1,"index":130}},
"id": {
"type": "Identifier",
"start":15,"end":16,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":1,"column":16,"index":16},"identifierName":"f"},
"name": "f"
},
"generator": false,
"async": true,
"params": [],
"body": {
"type": "BlockStatement",
"start":19,"end":130,"loc":{"start":{"line":1,"column":19,"index":19},"end":{"line":9,"column":1,"index":130}},
"body": [
{
"type": "BlockStatement",
"start":23,"end":66,"loc":{"start":{"line":2,"column":2,"index":23},"end":{"line":4,"column":3,"index":66}},
"body": [
{
"type": "VariableDeclaration",
"start":29,"end":62,"loc":{"start":{"line":3,"column":4,"index":29},"end":{"line":3,"column":37,"index":62}},
"declarations": [
{
"type": "VariableDeclarator",
"start":41,"end":50,"loc":{"start":{"line":3,"column":16,"index":41},"end":{"line":3,"column":25,"index":50}},
"id": {
"type": "Identifier",
"start":41,"end":42,"loc":{"start":{"line":3,"column":16,"index":41},"end":{"line":3,"column":17,"index":42},"identifierName":"f"},
"name": "f"
},
"init": {
"type": "CallExpression",
"start":45,"end":50,"loc":{"start":{"line":3,"column":20,"index":45},"end":{"line":3,"column":25,"index":50}},
"callee": {
"type": "Identifier",
"start":45,"end":48,"loc":{"start":{"line":3,"column":20,"index":45},"end":{"line":3,"column":23,"index":48},"identifierName":"foo"},
"name": "foo"
},
"arguments": []
}
},
{
"type": "VariableDeclarator",
"start":52,"end":61,"loc":{"start":{"line":3,"column":27,"index":52},"end":{"line":3,"column":36,"index":61}},
"id": {
"type": "Identifier",
"start":52,"end":53,"loc":{"start":{"line":3,"column":27,"index":52},"end":{"line":3,"column":28,"index":53},"identifierName":"f"},
"name": "f"
},
"init": {
"type": "CallExpression",
"start":56,"end":61,"loc":{"start":{"line":3,"column":31,"index":56},"end":{"line":3,"column":36,"index":61}},
"callee": {
"type": "Identifier",
"start":56,"end":59,"loc":{"start":{"line":3,"column":31,"index":56},"end":{"line":3,"column":34,"index":59},"identifierName":"foo"},
"name": "foo"
},
"arguments": []
}
}
],
"kind": "await using"
}
],
"directives": []
},
{
"type": "BlockStatement",
"start":69,"end":128,"loc":{"start":{"line":5,"column":2,"index":69},"end":{"line":8,"column":3,"index":128}},
"body": [
{
"type": "VariableDeclaration",
"start":75,"end":97,"loc":{"start":{"line":6,"column":4,"index":75},"end":{"line":6,"column":26,"index":97}},
"declarations": [
{
"type": "VariableDeclarator",
"start":87,"end":96,"loc":{"start":{"line":6,"column":16,"index":87},"end":{"line":6,"column":25,"index":96}},
"id": {
"type": "Identifier",
"start":87,"end":88,"loc":{"start":{"line":6,"column":16,"index":87},"end":{"line":6,"column":17,"index":88},"identifierName":"g"},
"name": "g"
},
"init": {
"type": "CallExpression",
"start":91,"end":96,"loc":{"start":{"line":6,"column":20,"index":91},"end":{"line":6,"column":25,"index":96}},
"callee": {
"type": "Identifier",
"start":91,"end":94,"loc":{"start":{"line":6,"column":20,"index":91},"end":{"line":6,"column":23,"index":94},"identifierName":"foo"},
"name": "foo"
},
"arguments": []
}
}
],
"kind": "await using"
},
{
"type": "VariableDeclaration",
"start":102,"end":124,"loc":{"start":{"line":7,"column":4,"index":102},"end":{"line":7,"column":26,"index":124}},
"declarations": [
{
"type": "VariableDeclarator",
"start":114,"end":123,"loc":{"start":{"line":7,"column":16,"index":114},"end":{"line":7,"column":25,"index":123}},
"id": {
"type": "Identifier",
"start":114,"end":115,"loc":{"start":{"line":7,"column":16,"index":114},"end":{"line":7,"column":17,"index":115},"identifierName":"g"},
"name": "g"
},
"init": {
"type": "CallExpression",
"start":118,"end":123,"loc":{"start":{"line":7,"column":20,"index":118},"end":{"line":7,"column":25,"index":123}},
"callee": {
"type": "Identifier",
"start":118,"end":121,"loc":{"start":{"line":7,"column":20,"index":118},"end":{"line":7,"column":23,"index":121},"identifierName":"foo"},
"name": "foo"
},
"arguments": []
}
}
],
"kind": "await using"
}
],
"directives": []
}
],
"directives": []
}
}
],
"directives": []
}
}