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

129 lines
5.8 KiB
JSON

{
"type": "File",
"start":0,"end":110,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":10,"column":1,"index":110}},
"errors": [
"SyntaxError: Using declaration cannot appear in the top level when source type is `script` or in the bare case statement. (5:6)",
"SyntaxError: Using declaration cannot appear in the top level when source type is `script` or in the bare case statement. (8:6)"
],
"program": {
"type": "Program",
"start":0,"end":110,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":10,"column":1,"index":110}},
"sourceType": "module",
"interpreter": null,
"body": [
{
"type": "BlockStatement",
"start":0,"end":110,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":10,"column":1,"index":110}},
"body": [
{
"type": "SwitchStatement",
"start":4,"end":108,"loc":{"start":{"line":2,"column":2,"index":4},"end":{"line":9,"column":3,"index":108}},
"discriminant": {
"type": "NumericLiteral",
"start":11,"end":12,"loc":{"start":{"line":2,"column":9,"index":11},"end":{"line":2,"column":10,"index":12}},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
},
"cases": [
{
"type": "SwitchCase",
"start":20,"end":59,"loc":{"start":{"line":3,"column":4,"index":20},"end":{"line":5,"column":22,"index":59}},
"consequent": [
{
"type": "BlockStatement",
"start":34,"end":36,"loc":{"start":{"line":4,"column":6,"index":34},"end":{"line":4,"column":8,"index":36}},
"body": [],
"directives": []
},
{
"type": "VariableDeclaration",
"start":43,"end":59,"loc":{"start":{"line":5,"column":6,"index":43},"end":{"line":5,"column":22,"index":59}},
"declarations": [
{
"type": "VariableDeclarator",
"start":49,"end":58,"loc":{"start":{"line":5,"column":12,"index":49},"end":{"line":5,"column":21,"index":58}},
"id": {
"type": "Identifier",
"start":49,"end":50,"loc":{"start":{"line":5,"column":12,"index":49},"end":{"line":5,"column":13,"index":50},"identifierName":"x"},
"name": "x"
},
"init": {
"type": "CallExpression",
"start":53,"end":58,"loc":{"start":{"line":5,"column":16,"index":53},"end":{"line":5,"column":21,"index":58}},
"callee": {
"type": "Identifier",
"start":53,"end":56,"loc":{"start":{"line":5,"column":16,"index":53},"end":{"line":5,"column":19,"index":56},"identifierName":"bar"},
"name": "bar"
},
"arguments": []
}
}
],
"kind": "using"
}
],
"test": {
"type": "NumericLiteral",
"start":25,"end":26,"loc":{"start":{"line":3,"column":9,"index":25},"end":{"line":3,"column":10,"index":26}},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
}
},
{
"type": "SwitchCase",
"start":64,"end":104,"loc":{"start":{"line":6,"column":4,"index":64},"end":{"line":8,"column":22,"index":104}},
"consequent": [
{
"type": "BlockStatement",
"start":79,"end":81,"loc":{"start":{"line":7,"column":6,"index":79},"end":{"line":7,"column":8,"index":81}},
"body": [],
"directives": []
},
{
"type": "VariableDeclaration",
"start":88,"end":104,"loc":{"start":{"line":8,"column":6,"index":88},"end":{"line":8,"column":22,"index":104}},
"declarations": [
{
"type": "VariableDeclarator",
"start":94,"end":103,"loc":{"start":{"line":8,"column":12,"index":94},"end":{"line":8,"column":21,"index":103}},
"id": {
"type": "Identifier",
"start":94,"end":95,"loc":{"start":{"line":8,"column":12,"index":94},"end":{"line":8,"column":13,"index":95},"identifierName":"y"},
"name": "y"
},
"init": {
"type": "CallExpression",
"start":98,"end":103,"loc":{"start":{"line":8,"column":16,"index":98},"end":{"line":8,"column":21,"index":103}},
"callee": {
"type": "Identifier",
"start":98,"end":101,"loc":{"start":{"line":8,"column":16,"index":98},"end":{"line":8,"column":19,"index":101},"identifierName":"bar"},
"name": "bar"
},
"arguments": []
}
}
],
"kind": "using"
}
],
"test": null
}
]
}
],
"directives": []
}
],
"directives": [],
"extra": {
"topLevelAwait": false
}
}
}