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":219,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":12,"column":1,"index":219}},
"errors": [
"SyntaxError: Can not use 'await' as identifier inside an async function. (2:14)",
"SyntaxError: Can not use 'await' as identifier inside an async function. (5:14)",
"SyntaxError: Can not use 'await' as identifier inside an async function. (8:23)",
"SyntaxError: Can not use 'await' as identifier inside an async function. (11:19)"
],
"program": {
"type": "Program",
"start":0,"end":219,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":12,"column":1,"index":219}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "FunctionDeclaration",
"start":0,"end":49,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":49}},
"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":49,"loc":{"start":{"line":1,"column":19,"index":19},"end":{"line":3,"column":1,"index":49}},
"body": [
{
"type": "VariableDeclaration",
"start":23,"end":47,"loc":{"start":{"line":2,"column":2,"index":23},"end":{"line":2,"column":26,"index":47}},
"declarations": [
{
"type": "VariableDeclarator",
"start":35,"end":46,"loc":{"start":{"line":2,"column":14,"index":35},"end":{"line":2,"column":25,"index":46}},
"id": {
"type": "Identifier",
"start":35,"end":40,"loc":{"start":{"line":2,"column":14,"index":35},"end":{"line":2,"column":19,"index":40},"identifierName":"await"},
"name": "await"
},
"init": {
"type": "CallExpression",
"start":43,"end":46,"loc":{"start":{"line":2,"column":22,"index":43},"end":{"line":2,"column":25,"index":46}},
"callee": {
"type": "Identifier",
"start":43,"end":44,"loc":{"start":{"line":2,"column":22,"index":43},"end":{"line":2,"column":23,"index":44},"identifierName":"h"},
"name": "h"
},
"arguments": []
}
}
],
"kind": "await using"
}
],
"directives": []
}
},
{
"type": "FunctionDeclaration",
"start":50,"end":104,"loc":{"start":{"line":4,"column":0,"index":50},"end":{"line":6,"column":1,"index":104}},
"id": {
"type": "Identifier",
"start":65,"end":66,"loc":{"start":{"line":4,"column":15,"index":65},"end":{"line":4,"column":16,"index":66},"identifierName":"f"},
"name": "f"
},
"generator": false,
"async": true,
"params": [],
"body": {
"type": "BlockStatement",
"start":69,"end":104,"loc":{"start":{"line":4,"column":19,"index":69},"end":{"line":6,"column":1,"index":104}},
"body": [
{
"type": "VariableDeclaration",
"start":73,"end":102,"loc":{"start":{"line":5,"column":2,"index":73},"end":{"line":5,"column":31,"index":102}},
"declarations": [
{
"type": "VariableDeclarator",
"start":85,"end":101,"loc":{"start":{"line":5,"column":14,"index":85},"end":{"line":5,"column":30,"index":101}},
"id": {
"type": "Identifier",
"start":85,"end":95,"loc":{"start":{"line":5,"column":14,"index":85},"end":{"line":5,"column":24,"index":95},"identifierName":"await"},
"name": "await"
},
"init": {
"type": "CallExpression",
"start":98,"end":101,"loc":{"start":{"line":5,"column":27,"index":98},"end":{"line":5,"column":30,"index":101}},
"callee": {
"type": "Identifier",
"start":98,"end":99,"loc":{"start":{"line":5,"column":27,"index":98},"end":{"line":5,"column":28,"index":99},"identifierName":"h"},
"name": "h"
},
"arguments": []
}
}
],
"kind": "await using"
}
],
"directives": []
}
},
{
"type": "FunctionDeclaration",
"start":105,"end":163,"loc":{"start":{"line":7,"column":0,"index":105},"end":{"line":9,"column":1,"index":163}},
"id": {
"type": "Identifier",
"start":120,"end":121,"loc":{"start":{"line":7,"column":15,"index":120},"end":{"line":7,"column":16,"index":121},"identifierName":"f"},
"name": "f"
},
"generator": false,
"async": true,
"params": [],
"body": {
"type": "BlockStatement",
"start":124,"end":163,"loc":{"start":{"line":7,"column":19,"index":124},"end":{"line":9,"column":1,"index":163}},
"body": [
{
"type": "VariableDeclaration",
"start":128,"end":161,"loc":{"start":{"line":8,"column":2,"index":128},"end":{"line":8,"column":35,"index":161}},
"declarations": [
{
"type": "VariableDeclarator",
"start":140,"end":147,"loc":{"start":{"line":8,"column":14,"index":140},"end":{"line":8,"column":21,"index":147}},
"id": {
"type": "Identifier",
"start":140,"end":141,"loc":{"start":{"line":8,"column":14,"index":140},"end":{"line":8,"column":15,"index":141},"identifierName":"x"},
"name": "x"
},
"init": {
"type": "CallExpression",
"start":144,"end":147,"loc":{"start":{"line":8,"column":18,"index":144},"end":{"line":8,"column":21,"index":147}},
"callee": {
"type": "Identifier",
"start":144,"end":145,"loc":{"start":{"line":8,"column":18,"index":144},"end":{"line":8,"column":19,"index":145},"identifierName":"h"},
"name": "h"
},
"arguments": []
}
},
{
"type": "VariableDeclarator",
"start":149,"end":160,"loc":{"start":{"line":8,"column":23,"index":149},"end":{"line":8,"column":34,"index":160}},
"id": {
"type": "Identifier",
"start":149,"end":154,"loc":{"start":{"line":8,"column":23,"index":149},"end":{"line":8,"column":28,"index":154},"identifierName":"await"},
"name": "await"
},
"init": {
"type": "CallExpression",
"start":157,"end":160,"loc":{"start":{"line":8,"column":31,"index":157},"end":{"line":8,"column":34,"index":160}},
"callee": {
"type": "Identifier",
"start":157,"end":158,"loc":{"start":{"line":8,"column":31,"index":157},"end":{"line":8,"column":32,"index":158},"identifierName":"h"},
"name": "h"
},
"arguments": []
}
}
],
"kind": "await using"
}
],
"directives": []
}
},
{
"type": "FunctionDeclaration",
"start":164,"end":219,"loc":{"start":{"line":10,"column":0,"index":164},"end":{"line":12,"column":1,"index":219}},
"id": {
"type": "Identifier",
"start":179,"end":180,"loc":{"start":{"line":10,"column":15,"index":179},"end":{"line":10,"column":16,"index":180},"identifierName":"f"},
"name": "f"
},
"generator": false,
"async": true,
"params": [],
"body": {
"type": "BlockStatement",
"start":183,"end":219,"loc":{"start":{"line":10,"column":19,"index":183},"end":{"line":12,"column":1,"index":219}},
"body": [
{
"type": "ForOfStatement",
"start":187,"end":217,"loc":{"start":{"line":11,"column":2,"index":187},"end":{"line":11,"column":32,"index":217}},
"await": false,
"left": {
"type": "VariableDeclaration",
"start":192,"end":209,"loc":{"start":{"line":11,"column":7,"index":192},"end":{"line":11,"column":24,"index":209}},
"declarations": [
{
"type": "VariableDeclarator",
"start":204,"end":209,"loc":{"start":{"line":11,"column":19,"index":204},"end":{"line":11,"column":24,"index":209}},
"id": {
"type": "Identifier",
"start":204,"end":209,"loc":{"start":{"line":11,"column":19,"index":204},"end":{"line":11,"column":24,"index":209},"identifierName":"await"},
"name": "await"
},
"init": null
}
],
"kind": "await using"
},
"right": {
"type": "ArrayExpression",
"start":213,"end":215,"loc":{"start":{"line":11,"column":28,"index":213},"end":{"line":11,"column":30,"index":215}},
"elements": []
},
"body": {
"type": "EmptyStatement",
"start":216,"end":217,"loc":{"start":{"line":11,"column":31,"index":216},"end":{"line":11,"column":32,"index":217}}
}
}
],
"directives": []
}
}
],
"directives": []
}
}