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

224 lines
10 KiB
JSON

{
"type": "File",
"start":0,"end":161,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":8,"column":1,"index":161}},
"errors": [
"SyntaxError: Lexical declaration cannot appear in a single-statement context. (2:12)",
"SyntaxError: Lexical declaration cannot appear in a single-statement context. (3:11)",
"SyntaxError: Lexical declaration cannot appear in a single-statement context. (4:5)",
"SyntaxError: Lexical declaration cannot appear in a single-statement context. (5:9)",
"SyntaxError: Lexical declaration cannot appear in a single-statement context. (6:11)",
"SyntaxError: Lexical declaration cannot appear in a single-statement context. (7:9)"
],
"program": {
"type": "Program",
"start":0,"end":161,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":8,"column":1,"index":161}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "BlockStatement",
"start":0,"end":161,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":8,"column":1,"index":161}},
"body": [
{
"type": "WhileStatement",
"start":4,"end":28,"loc":{"start":{"line":2,"column":2,"index":4},"end":{"line":2,"column":26,"index":28}},
"test": {
"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
},
"body": {
"type": "VariableDeclaration",
"start":14,"end":28,"loc":{"start":{"line":2,"column":12,"index":14},"end":{"line":2,"column":26,"index":28}},
"declarations": [
{
"type": "VariableDeclarator",
"start":20,"end":27,"loc":{"start":{"line":2,"column":18,"index":20},"end":{"line":2,"column":25,"index":27}},
"id": {
"type": "Identifier",
"start":20,"end":21,"loc":{"start":{"line":2,"column":18,"index":20},"end":{"line":2,"column":19,"index":21},"identifierName":"a"},
"name": "a"
},
"init": {
"type": "Identifier",
"start":24,"end":27,"loc":{"start":{"line":2,"column":22,"index":24},"end":{"line":2,"column":25,"index":27},"identifierName":"foo"},
"name": "foo"
}
}
],
"kind": "using"
}
},
{
"type": "ForStatement",
"start":31,"end":54,"loc":{"start":{"line":3,"column":2,"index":31},"end":{"line":3,"column":25,"index":54}},
"init": null,
"test": null,
"update": null,
"body": {
"type": "VariableDeclaration",
"start":40,"end":54,"loc":{"start":{"line":3,"column":11,"index":40},"end":{"line":3,"column":25,"index":54}},
"declarations": [
{
"type": "VariableDeclarator",
"start":46,"end":53,"loc":{"start":{"line":3,"column":17,"index":46},"end":{"line":3,"column":24,"index":53}},
"id": {
"type": "Identifier",
"start":46,"end":47,"loc":{"start":{"line":3,"column":17,"index":46},"end":{"line":3,"column":18,"index":47},"identifierName":"b"},
"name": "b"
},
"init": {
"type": "Identifier",
"start":50,"end":53,"loc":{"start":{"line":3,"column":21,"index":50},"end":{"line":3,"column":24,"index":53},"identifierName":"foo"},
"name": "foo"
}
}
],
"kind": "using"
}
},
{
"type": "DoWhileStatement",
"start":57,"end":85,"loc":{"start":{"line":4,"column":2,"index":57},"end":{"line":4,"column":30,"index":85}},
"body": {
"type": "VariableDeclaration",
"start":60,"end":74,"loc":{"start":{"line":4,"column":5,"index":60},"end":{"line":4,"column":19,"index":74}},
"declarations": [
{
"type": "VariableDeclarator",
"start":66,"end":73,"loc":{"start":{"line":4,"column":11,"index":66},"end":{"line":4,"column":18,"index":73}},
"id": {
"type": "Identifier",
"start":66,"end":67,"loc":{"start":{"line":4,"column":11,"index":66},"end":{"line":4,"column":12,"index":67},"identifierName":"c"},
"name": "c"
},
"init": {
"type": "Identifier",
"start":70,"end":73,"loc":{"start":{"line":4,"column":15,"index":70},"end":{"line":4,"column":18,"index":73},"identifierName":"foo"},
"name": "foo"
}
}
],
"kind": "using"
},
"test": {
"type": "NumericLiteral",
"start":82,"end":83,"loc":{"start":{"line":4,"column":27,"index":82},"end":{"line":4,"column":28,"index":83}},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
}
},
{
"type": "IfStatement",
"start":88,"end":109,"loc":{"start":{"line":5,"column":2,"index":88},"end":{"line":5,"column":23,"index":109}},
"test": {
"type": "NumericLiteral",
"start":92,"end":93,"loc":{"start":{"line":5,"column":6,"index":92},"end":{"line":5,"column":7,"index":93}},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
},
"consequent": {
"type": "VariableDeclaration",
"start":95,"end":109,"loc":{"start":{"line":5,"column":9,"index":95},"end":{"line":5,"column":23,"index":109}},
"declarations": [
{
"type": "VariableDeclarator",
"start":101,"end":108,"loc":{"start":{"line":5,"column":15,"index":101},"end":{"line":5,"column":22,"index":108}},
"id": {
"type": "Identifier",
"start":101,"end":102,"loc":{"start":{"line":5,"column":15,"index":101},"end":{"line":5,"column":16,"index":102},"identifierName":"d"},
"name": "d"
},
"init": {
"type": "Identifier",
"start":105,"end":108,"loc":{"start":{"line":5,"column":19,"index":105},"end":{"line":5,"column":22,"index":108},"identifierName":"foo"},
"name": "foo"
}
}
],
"kind": "using"
},
"alternate": null
},
{
"type": "WithStatement",
"start":112,"end":135,"loc":{"start":{"line":6,"column":2,"index":112},"end":{"line":6,"column":25,"index":135}},
"object": {
"type": "NumericLiteral",
"start":118,"end":119,"loc":{"start":{"line":6,"column":8,"index":118},"end":{"line":6,"column":9,"index":119}},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
},
"body": {
"type": "VariableDeclaration",
"start":121,"end":135,"loc":{"start":{"line":6,"column":11,"index":121},"end":{"line":6,"column":25,"index":135}},
"declarations": [
{
"type": "VariableDeclarator",
"start":127,"end":134,"loc":{"start":{"line":6,"column":17,"index":127},"end":{"line":6,"column":24,"index":134}},
"id": {
"type": "Identifier",
"start":127,"end":128,"loc":{"start":{"line":6,"column":17,"index":127},"end":{"line":6,"column":18,"index":128},"identifierName":"e"},
"name": "e"
},
"init": {
"type": "Identifier",
"start":131,"end":134,"loc":{"start":{"line":6,"column":21,"index":131},"end":{"line":6,"column":24,"index":134},"identifierName":"foo"},
"name": "foo"
}
}
],
"kind": "using"
}
},
{
"type": "LabeledStatement",
"start":138,"end":159,"loc":{"start":{"line":7,"column":2,"index":138},"end":{"line":7,"column":23,"index":159}},
"body": {
"type": "VariableDeclaration",
"start":145,"end":159,"loc":{"start":{"line":7,"column":9,"index":145},"end":{"line":7,"column":23,"index":159}},
"declarations": [
{
"type": "VariableDeclarator",
"start":151,"end":158,"loc":{"start":{"line":7,"column":15,"index":151},"end":{"line":7,"column":22,"index":158}},
"id": {
"type": "Identifier",
"start":151,"end":152,"loc":{"start":{"line":7,"column":15,"index":151},"end":{"line":7,"column":16,"index":152},"identifierName":"f"},
"name": "f"
},
"init": {
"type": "Identifier",
"start":155,"end":158,"loc":{"start":{"line":7,"column":19,"index":155},"end":{"line":7,"column":22,"index":158},"identifierName":"foo"},
"name": "foo"
}
}
],
"kind": "using"
},
"label": {
"type": "Identifier",
"start":138,"end":143,"loc":{"start":{"line":7,"column":2,"index":138},"end":{"line":7,"column":7,"index":143},"identifierName":"label"},
"name": "label"
}
}
],
"directives": []
}
],
"directives": []
}
}