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":181,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":14,"column":1,"index":181}},
"program": {
"type": "Program",
"start":0,"end":181,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":14,"column":1,"index":181}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "FunctionDeclaration",
"start":0,"end":181,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":14,"column":1,"index":181}},
"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":181,"loc":{"start":{"line":1,"column":19,"index":19},"end":{"line":14,"column":1,"index":181}},
"body": [
{
"type": "SwitchStatement",
"start":23,"end":179,"loc":{"start":{"line":2,"column":2,"index":23},"end":{"line":13,"column":3,"index":179}},
"discriminant": {
"type": "NumericLiteral",
"start":30,"end":31,"loc":{"start":{"line":2,"column":9,"index":30},"end":{"line":2,"column":10,"index":31}},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
},
"cases": [
{
"type": "SwitchCase",
"start":39,"end":104,"loc":{"start":{"line":3,"column":4,"index":39},"end":{"line":7,"column":7,"index":104}},
"consequent": [
{
"type": "BlockStatement",
"start":53,"end":104,"loc":{"start":{"line":4,"column":6,"index":53},"end":{"line":7,"column":7,"index":104}},
"body": [
{
"type": "BlockStatement",
"start":63,"end":65,"loc":{"start":{"line":5,"column":8,"index":63},"end":{"line":5,"column":10,"index":65}},
"body": [],
"directives": []
},
{
"type": "VariableDeclaration",
"start":74,"end":96,"loc":{"start":{"line":6,"column":8,"index":74},"end":{"line":6,"column":30,"index":96}},
"declarations": [
{
"type": "VariableDeclarator",
"start":86,"end":95,"loc":{"start":{"line":6,"column":20,"index":86},"end":{"line":6,"column":29,"index":95}},
"id": {
"type": "Identifier",
"start":86,"end":87,"loc":{"start":{"line":6,"column":20,"index":86},"end":{"line":6,"column":21,"index":87},"identifierName":"x"},
"name": "x"
},
"init": {
"type": "CallExpression",
"start":90,"end":95,"loc":{"start":{"line":6,"column":24,"index":90},"end":{"line":6,"column":29,"index":95}},
"callee": {
"type": "Identifier",
"start":90,"end":93,"loc":{"start":{"line":6,"column":24,"index":90},"end":{"line":6,"column":27,"index":93},"identifierName":"bar"},
"name": "bar"
},
"arguments": []
}
}
],
"kind": "await using"
}
],
"directives": []
}
],
"test": {
"type": "NumericLiteral",
"start":44,"end":45,"loc":{"start":{"line":3,"column":9,"index":44},"end":{"line":3,"column":10,"index":45}},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
}
},
{
"type": "SwitchCase",
"start":109,"end":175,"loc":{"start":{"line":8,"column":4,"index":109},"end":{"line":12,"column":7,"index":175}},
"consequent": [
{
"type": "BlockStatement",
"start":124,"end":175,"loc":{"start":{"line":9,"column":6,"index":124},"end":{"line":12,"column":7,"index":175}},
"body": [
{
"type": "BlockStatement",
"start":134,"end":136,"loc":{"start":{"line":10,"column":8,"index":134},"end":{"line":10,"column":10,"index":136}},
"body": [],
"directives": []
},
{
"type": "VariableDeclaration",
"start":145,"end":167,"loc":{"start":{"line":11,"column":8,"index":145},"end":{"line":11,"column":30,"index":167}},
"declarations": [
{
"type": "VariableDeclarator",
"start":157,"end":166,"loc":{"start":{"line":11,"column":20,"index":157},"end":{"line":11,"column":29,"index":166}},
"id": {
"type": "Identifier",
"start":157,"end":158,"loc":{"start":{"line":11,"column":20,"index":157},"end":{"line":11,"column":21,"index":158},"identifierName":"x"},
"name": "x"
},
"init": {
"type": "CallExpression",
"start":161,"end":166,"loc":{"start":{"line":11,"column":24,"index":161},"end":{"line":11,"column":29,"index":166}},
"callee": {
"type": "Identifier",
"start":161,"end":164,"loc":{"start":{"line":11,"column":24,"index":161},"end":{"line":11,"column":27,"index":164},"identifierName":"bar"},
"name": "bar"
},
"arguments": []
}
}
],
"kind": "await using"
}
],
"directives": []
}
],
"test": null
}
]
}
],
"directives": []
}
}
],
"directives": []
}
}