Parse async do expressions (#13043)
* parse async do expressions * add test cases * update test fixtures * chore: add syntax-async-do-expressions * generater support * fix: do not transform async do expressions * chore: add asyncDoExpressions to missing plugin helpers * update ast types * add more test cases * throw when asyncDoExpressions is enabled but not doExpressions * avoid add parentheses for async do expressions * address review comments * chore: update parser typings
This commit is contained in:
committed by
Nicolò Ribaudo
parent
f30c99aa24
commit
28d7442aae
@@ -0,0 +1 @@
|
||||
(async do {x})
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"throws": "This experimental syntax requires enabling the parser plugin: 'asyncDoExpressions' (1:7)",
|
||||
"plugins": [
|
||||
"doExpressions"
|
||||
]
|
||||
}
|
||||
1
packages/babel-parser/test/fixtures/experimental/_no-plugin/async-do-expressions/input.js
vendored
Normal file
1
packages/babel-parser/test/fixtures/experimental/_no-plugin/async-do-expressions/input.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(async do {x})
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"throws": "This experimental syntax requires enabling the parser plugin: 'doExpressions' (1:7)",
|
||||
"plugins": []
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
async
|
||||
do {
|
||||
42
|
||||
}
|
||||
while (false);
|
||||
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start":0,"end":32,"loc":{"start":{"line":1,"column":0},"end":{"line":5,"column":14}},
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start":0,"end":32,"loc":{"start":{"line":1,"column":0},"end":{"line":5,"column":14}},
|
||||
"sourceType": "script",
|
||||
"interpreter": null,
|
||||
"body": [
|
||||
{
|
||||
"type": "ExpressionStatement",
|
||||
"start":0,"end":5,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":5}},
|
||||
"expression": {
|
||||
"type": "Identifier",
|
||||
"start":0,"end":5,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":5},"identifierName":"async"},
|
||||
"name": "async"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "DoWhileStatement",
|
||||
"start":6,"end":32,"loc":{"start":{"line":2,"column":0},"end":{"line":5,"column":14}},
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":9,"end":17,"loc":{"start":{"line":2,"column":3},"end":{"line":4,"column":1}},
|
||||
"body": [
|
||||
{
|
||||
"type": "ExpressionStatement",
|
||||
"start":13,"end":15,"loc":{"start":{"line":3,"column":2},"end":{"line":3,"column":4}},
|
||||
"expression": {
|
||||
"type": "NumericLiteral",
|
||||
"start":13,"end":15,"loc":{"start":{"line":3,"column":2},"end":{"line":3,"column":4}},
|
||||
"extra": {
|
||||
"rawValue": 42,
|
||||
"raw": "42"
|
||||
},
|
||||
"value": 42
|
||||
}
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
},
|
||||
"test": {
|
||||
"type": "BooleanLiteral",
|
||||
"start":25,"end":30,"loc":{"start":{"line":5,"column":7},"end":{"line":5,"column":12}},
|
||||
"value": false
|
||||
}
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
async do {
|
||||
42
|
||||
}
|
||||
while (false);
|
||||
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start":0,"end":32,"loc":{"start":{"line":1,"column":0},"end":{"line":4,"column":14}},
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start":0,"end":32,"loc":{"start":{"line":1,"column":0},"end":{"line":4,"column":14}},
|
||||
"sourceType": "script",
|
||||
"interpreter": null,
|
||||
"body": [
|
||||
{
|
||||
"type": "ExpressionStatement",
|
||||
"start":0,"end":17,"loc":{"start":{"line":1,"column":0},"end":{"line":3,"column":1}},
|
||||
"expression": {
|
||||
"type": "DoExpression",
|
||||
"start":6,"end":17,"loc":{"start":{"line":1,"column":6},"end":{"line":3,"column":1}},
|
||||
"async": true,
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":9,"end":17,"loc":{"start":{"line":1,"column":9},"end":{"line":3,"column":1}},
|
||||
"body": [
|
||||
{
|
||||
"type": "ExpressionStatement",
|
||||
"start":13,"end":15,"loc":{"start":{"line":2,"column":2},"end":{"line":2,"column":4}},
|
||||
"expression": {
|
||||
"type": "NumericLiteral",
|
||||
"start":13,"end":15,"loc":{"start":{"line":2,"column":2},"end":{"line":2,"column":4}},
|
||||
"extra": {
|
||||
"rawValue": 42,
|
||||
"raw": "42"
|
||||
},
|
||||
"value": 42
|
||||
}
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "WhileStatement",
|
||||
"start":18,"end":32,"loc":{"start":{"line":4,"column":0},"end":{"line":4,"column":14}},
|
||||
"test": {
|
||||
"type": "BooleanLiteral",
|
||||
"start":25,"end":30,"loc":{"start":{"line":4,"column":7},"end":{"line":4,"column":12}},
|
||||
"value": false
|
||||
},
|
||||
"body": {
|
||||
"type": "EmptyStatement",
|
||||
"start":31,"end":32,"loc":{"start":{"line":4,"column":13},"end":{"line":4,"column":14}}
|
||||
}
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
4
packages/babel-parser/test/fixtures/experimental/async-do-expressions/asi/input.js
vendored
Normal file
4
packages/babel-parser/test/fixtures/experimental/async-do-expressions/asi/input.js
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
async
|
||||
do {
|
||||
42
|
||||
}
|
||||
3
packages/babel-parser/test/fixtures/experimental/async-do-expressions/asi/options.json
vendored
Normal file
3
packages/babel-parser/test/fixtures/experimental/async-do-expressions/asi/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"throws": "Unexpected token, expected \"while\" (4:1)"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
let x = async do {
|
||||
if (foo()) { f() }
|
||||
else if (bar()) { g() }
|
||||
else { h() }
|
||||
};
|
||||
@@ -0,0 +1,132 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start":0,"end":83,"loc":{"start":{"line":1,"column":0},"end":{"line":5,"column":2}},
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start":0,"end":83,"loc":{"start":{"line":1,"column":0},"end":{"line":5,"column":2}},
|
||||
"sourceType": "script",
|
||||
"interpreter": null,
|
||||
"body": [
|
||||
{
|
||||
"type": "VariableDeclaration",
|
||||
"start":0,"end":83,"loc":{"start":{"line":1,"column":0},"end":{"line":5,"column":2}},
|
||||
"declarations": [
|
||||
{
|
||||
"type": "VariableDeclarator",
|
||||
"start":4,"end":82,"loc":{"start":{"line":1,"column":4},"end":{"line":5,"column":1}},
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start":4,"end":5,"loc":{"start":{"line":1,"column":4},"end":{"line":1,"column":5},"identifierName":"x"},
|
||||
"name": "x"
|
||||
},
|
||||
"init": {
|
||||
"type": "DoExpression",
|
||||
"start":14,"end":82,"loc":{"start":{"line":1,"column":14},"end":{"line":5,"column":1}},
|
||||
"async": true,
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":17,"end":82,"loc":{"start":{"line":1,"column":17},"end":{"line":5,"column":1}},
|
||||
"body": [
|
||||
{
|
||||
"type": "IfStatement",
|
||||
"start":21,"end":80,"loc":{"start":{"line":2,"column":2},"end":{"line":4,"column":14}},
|
||||
"test": {
|
||||
"type": "CallExpression",
|
||||
"start":25,"end":30,"loc":{"start":{"line":2,"column":6},"end":{"line":2,"column":11}},
|
||||
"callee": {
|
||||
"type": "Identifier",
|
||||
"start":25,"end":28,"loc":{"start":{"line":2,"column":6},"end":{"line":2,"column":9},"identifierName":"foo"},
|
||||
"name": "foo"
|
||||
},
|
||||
"arguments": []
|
||||
},
|
||||
"consequent": {
|
||||
"type": "BlockStatement",
|
||||
"start":32,"end":39,"loc":{"start":{"line":2,"column":13},"end":{"line":2,"column":20}},
|
||||
"body": [
|
||||
{
|
||||
"type": "ExpressionStatement",
|
||||
"start":34,"end":37,"loc":{"start":{"line":2,"column":15},"end":{"line":2,"column":18}},
|
||||
"expression": {
|
||||
"type": "CallExpression",
|
||||
"start":34,"end":37,"loc":{"start":{"line":2,"column":15},"end":{"line":2,"column":18}},
|
||||
"callee": {
|
||||
"type": "Identifier",
|
||||
"start":34,"end":35,"loc":{"start":{"line":2,"column":15},"end":{"line":2,"column":16},"identifierName":"f"},
|
||||
"name": "f"
|
||||
},
|
||||
"arguments": []
|
||||
}
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
},
|
||||
"alternate": {
|
||||
"type": "IfStatement",
|
||||
"start":47,"end":80,"loc":{"start":{"line":3,"column":7},"end":{"line":4,"column":14}},
|
||||
"test": {
|
||||
"type": "CallExpression",
|
||||
"start":51,"end":56,"loc":{"start":{"line":3,"column":11},"end":{"line":3,"column":16}},
|
||||
"callee": {
|
||||
"type": "Identifier",
|
||||
"start":51,"end":54,"loc":{"start":{"line":3,"column":11},"end":{"line":3,"column":14},"identifierName":"bar"},
|
||||
"name": "bar"
|
||||
},
|
||||
"arguments": []
|
||||
},
|
||||
"consequent": {
|
||||
"type": "BlockStatement",
|
||||
"start":58,"end":65,"loc":{"start":{"line":3,"column":18},"end":{"line":3,"column":25}},
|
||||
"body": [
|
||||
{
|
||||
"type": "ExpressionStatement",
|
||||
"start":60,"end":63,"loc":{"start":{"line":3,"column":20},"end":{"line":3,"column":23}},
|
||||
"expression": {
|
||||
"type": "CallExpression",
|
||||
"start":60,"end":63,"loc":{"start":{"line":3,"column":20},"end":{"line":3,"column":23}},
|
||||
"callee": {
|
||||
"type": "Identifier",
|
||||
"start":60,"end":61,"loc":{"start":{"line":3,"column":20},"end":{"line":3,"column":21},"identifierName":"g"},
|
||||
"name": "g"
|
||||
},
|
||||
"arguments": []
|
||||
}
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
},
|
||||
"alternate": {
|
||||
"type": "BlockStatement",
|
||||
"start":73,"end":80,"loc":{"start":{"line":4,"column":7},"end":{"line":4,"column":14}},
|
||||
"body": [
|
||||
{
|
||||
"type": "ExpressionStatement",
|
||||
"start":75,"end":78,"loc":{"start":{"line":4,"column":9},"end":{"line":4,"column":12}},
|
||||
"expression": {
|
||||
"type": "CallExpression",
|
||||
"start":75,"end":78,"loc":{"start":{"line":4,"column":9},"end":{"line":4,"column":12}},
|
||||
"callee": {
|
||||
"type": "Identifier",
|
||||
"start":75,"end":76,"loc":{"start":{"line":4,"column":9},"end":{"line":4,"column":10},"identifierName":"h"},
|
||||
"name": "h"
|
||||
},
|
||||
"arguments": []
|
||||
}
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"kind": "let"
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
async do {
|
||||
await 42
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start":0,"end":23,"loc":{"start":{"line":1,"column":0},"end":{"line":3,"column":1}},
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start":0,"end":23,"loc":{"start":{"line":1,"column":0},"end":{"line":3,"column":1}},
|
||||
"sourceType": "script",
|
||||
"interpreter": null,
|
||||
"body": [
|
||||
{
|
||||
"type": "ExpressionStatement",
|
||||
"start":0,"end":23,"loc":{"start":{"line":1,"column":0},"end":{"line":3,"column":1}},
|
||||
"expression": {
|
||||
"type": "DoExpression",
|
||||
"start":6,"end":23,"loc":{"start":{"line":1,"column":6},"end":{"line":3,"column":1}},
|
||||
"async": true,
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":9,"end":23,"loc":{"start":{"line":1,"column":9},"end":{"line":3,"column":1}},
|
||||
"body": [
|
||||
{
|
||||
"type": "ExpressionStatement",
|
||||
"start":13,"end":21,"loc":{"start":{"line":2,"column":2},"end":{"line":2,"column":10}},
|
||||
"expression": {
|
||||
"type": "AwaitExpression",
|
||||
"start":13,"end":21,"loc":{"start":{"line":2,"column":2},"end":{"line":2,"column":10}},
|
||||
"argument": {
|
||||
"type": "NumericLiteral",
|
||||
"start":19,"end":21,"loc":{"start":{"line":2,"column":8},"end":{"line":2,"column":10}},
|
||||
"extra": {
|
||||
"rawValue": 42,
|
||||
"raw": "42"
|
||||
},
|
||||
"value": 42
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
8
packages/babel-parser/test/fixtures/experimental/async-do-expressions/invalid-break/input.js
vendored
Normal file
8
packages/babel-parser/test/fixtures/experimental/async-do-expressions/invalid-break/input.js
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
function iter() {
|
||||
switch(1) {
|
||||
default:
|
||||
var x = async do {
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
94
packages/babel-parser/test/fixtures/experimental/async-do-expressions/invalid-break/output.json
vendored
Normal file
94
packages/babel-parser/test/fixtures/experimental/async-do-expressions/invalid-break/output.json
vendored
Normal file
@@ -0,0 +1,94 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start":0,"end":99,"loc":{"start":{"line":1,"column":0},"end":{"line":8,"column":2}},
|
||||
"errors": [
|
||||
"SyntaxError: Unsyntactic break (5:8)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start":0,"end":99,"loc":{"start":{"line":1,"column":0},"end":{"line":8,"column":2}},
|
||||
"sourceType": "script",
|
||||
"interpreter": null,
|
||||
"body": [
|
||||
{
|
||||
"type": "FunctionDeclaration",
|
||||
"start":0,"end":98,"loc":{"start":{"line":1,"column":0},"end":{"line":8,"column":1}},
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start":9,"end":13,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":13},"identifierName":"iter"},
|
||||
"name": "iter"
|
||||
},
|
||||
"generator": false,
|
||||
"async": false,
|
||||
"params": [],
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":16,"end":98,"loc":{"start":{"line":1,"column":16},"end":{"line":8,"column":1}},
|
||||
"body": [
|
||||
{
|
||||
"type": "SwitchStatement",
|
||||
"start":20,"end":96,"loc":{"start":{"line":2,"column":2},"end":{"line":7,"column":3}},
|
||||
"discriminant": {
|
||||
"type": "NumericLiteral",
|
||||
"start":27,"end":28,"loc":{"start":{"line":2,"column":9},"end":{"line":2,"column":10}},
|
||||
"extra": {
|
||||
"rawValue": 1,
|
||||
"raw": "1"
|
||||
},
|
||||
"value": 1
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"type": "SwitchCase",
|
||||
"start":36,"end":92,"loc":{"start":{"line":3,"column":4},"end":{"line":6,"column":7}},
|
||||
"consequent": [
|
||||
{
|
||||
"type": "VariableDeclaration",
|
||||
"start":51,"end":92,"loc":{"start":{"line":4,"column":6},"end":{"line":6,"column":7}},
|
||||
"declarations": [
|
||||
{
|
||||
"type": "VariableDeclarator",
|
||||
"start":55,"end":92,"loc":{"start":{"line":4,"column":10},"end":{"line":6,"column":7}},
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start":55,"end":56,"loc":{"start":{"line":4,"column":10},"end":{"line":4,"column":11},"identifierName":"x"},
|
||||
"name": "x"
|
||||
},
|
||||
"init": {
|
||||
"type": "DoExpression",
|
||||
"start":65,"end":92,"loc":{"start":{"line":4,"column":20},"end":{"line":6,"column":7}},
|
||||
"async": true,
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":68,"end":92,"loc":{"start":{"line":4,"column":23},"end":{"line":6,"column":7}},
|
||||
"body": [
|
||||
{
|
||||
"type": "BreakStatement",
|
||||
"start":78,"end":84,"loc":{"start":{"line":5,"column":8},"end":{"line":5,"column":14}},
|
||||
"label": null
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"kind": "var"
|
||||
}
|
||||
],
|
||||
"test": null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "EmptyStatement",
|
||||
"start":98,"end":99,"loc":{"start":{"line":8,"column":1},"end":{"line":8,"column":2}}
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
async function *iter() {
|
||||
await async do {
|
||||
yield 1;
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,81 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start":0,"end":63,"loc":{"start":{"line":1,"column":0},"end":{"line":5,"column":2}},
|
||||
"errors": [
|
||||
"SyntaxError: Missing semicolon (3:9)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start":0,"end":63,"loc":{"start":{"line":1,"column":0},"end":{"line":5,"column":2}},
|
||||
"sourceType": "script",
|
||||
"interpreter": null,
|
||||
"body": [
|
||||
{
|
||||
"type": "FunctionDeclaration",
|
||||
"start":0,"end":62,"loc":{"start":{"line":1,"column":0},"end":{"line":5,"column":1}},
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start":16,"end":20,"loc":{"start":{"line":1,"column":16},"end":{"line":1,"column":20},"identifierName":"iter"},
|
||||
"name": "iter"
|
||||
},
|
||||
"generator": true,
|
||||
"async": true,
|
||||
"params": [],
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":23,"end":62,"loc":{"start":{"line":1,"column":23},"end":{"line":5,"column":1}},
|
||||
"body": [
|
||||
{
|
||||
"type": "ExpressionStatement",
|
||||
"start":27,"end":60,"loc":{"start":{"line":2,"column":2},"end":{"line":4,"column":3}},
|
||||
"expression": {
|
||||
"type": "AwaitExpression",
|
||||
"start":27,"end":60,"loc":{"start":{"line":2,"column":2},"end":{"line":4,"column":3}},
|
||||
"argument": {
|
||||
"type": "DoExpression",
|
||||
"start":39,"end":60,"loc":{"start":{"line":2,"column":14},"end":{"line":4,"column":3}},
|
||||
"async": true,
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":42,"end":60,"loc":{"start":{"line":2,"column":17},"end":{"line":4,"column":3}},
|
||||
"body": [
|
||||
{
|
||||
"type": "ExpressionStatement",
|
||||
"start":48,"end":53,"loc":{"start":{"line":3,"column":4},"end":{"line":3,"column":9}},
|
||||
"expression": {
|
||||
"type": "Identifier",
|
||||
"start":48,"end":53,"loc":{"start":{"line":3,"column":4},"end":{"line":3,"column":9},"identifierName":"yield"},
|
||||
"name": "yield"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "ExpressionStatement",
|
||||
"start":54,"end":56,"loc":{"start":{"line":3,"column":10},"end":{"line":3,"column":12}},
|
||||
"expression": {
|
||||
"type": "NumericLiteral",
|
||||
"start":54,"end":55,"loc":{"start":{"line":3,"column":10},"end":{"line":3,"column":11}},
|
||||
"extra": {
|
||||
"rawValue": 1,
|
||||
"raw": "1"
|
||||
},
|
||||
"value": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "EmptyStatement",
|
||||
"start":62,"end":63,"loc":{"start":{"line":5,"column":1},"end":{"line":5,"column":2}}
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
function iter() {
|
||||
return async do {
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
68
packages/babel-parser/test/fixtures/experimental/async-do-expressions/invalid-return/output.json
vendored
Normal file
68
packages/babel-parser/test/fixtures/experimental/async-do-expressions/invalid-return/output.json
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start":0,"end":58,"loc":{"start":{"line":1,"column":0},"end":{"line":5,"column":2}},
|
||||
"errors": [
|
||||
"SyntaxError: 'return' outside of function (3:4)"
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start":0,"end":58,"loc":{"start":{"line":1,"column":0},"end":{"line":5,"column":2}},
|
||||
"sourceType": "script",
|
||||
"interpreter": null,
|
||||
"body": [
|
||||
{
|
||||
"type": "FunctionDeclaration",
|
||||
"start":0,"end":57,"loc":{"start":{"line":1,"column":0},"end":{"line":5,"column":1}},
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start":9,"end":13,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":13},"identifierName":"iter"},
|
||||
"name": "iter"
|
||||
},
|
||||
"generator": false,
|
||||
"async": false,
|
||||
"params": [],
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":16,"end":57,"loc":{"start":{"line":1,"column":16},"end":{"line":5,"column":1}},
|
||||
"body": [
|
||||
{
|
||||
"type": "ReturnStatement",
|
||||
"start":20,"end":55,"loc":{"start":{"line":2,"column":2},"end":{"line":4,"column":3}},
|
||||
"argument": {
|
||||
"type": "DoExpression",
|
||||
"start":33,"end":55,"loc":{"start":{"line":2,"column":15},"end":{"line":4,"column":3}},
|
||||
"async": true,
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":36,"end":55,"loc":{"start":{"line":2,"column":18},"end":{"line":4,"column":3}},
|
||||
"body": [
|
||||
{
|
||||
"type": "ReturnStatement",
|
||||
"start":42,"end":51,"loc":{"start":{"line":3,"column":4},"end":{"line":3,"column":13}},
|
||||
"argument": {
|
||||
"type": "NumericLiteral",
|
||||
"start":49,"end":50,"loc":{"start":{"line":3,"column":11},"end":{"line":3,"column":12}},
|
||||
"extra": {
|
||||
"rawValue": 1,
|
||||
"raw": "1"
|
||||
},
|
||||
"value": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "EmptyStatement",
|
||||
"start":57,"end":58,"loc":{"start":{"line":5,"column":1},"end":{"line":5,"column":2}}
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
3
packages/babel-parser/test/fixtures/experimental/async-do-expressions/options.json
vendored
Normal file
3
packages/babel-parser/test/fixtures/experimental/async-do-expressions/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"plugins": ["doExpressions", "asyncDoExpressions"]
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
let x = async do {
|
||||
let tmp = f();
|
||||
tmp * tmp + 1
|
||||
};
|
||||
100
packages/babel-parser/test/fixtures/experimental/async-do-expressions/scoping-variable/output.json
vendored
Normal file
100
packages/babel-parser/test/fixtures/experimental/async-do-expressions/scoping-variable/output.json
vendored
Normal file
@@ -0,0 +1,100 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start":0,"end":54,"loc":{"start":{"line":1,"column":0},"end":{"line":4,"column":2}},
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start":0,"end":54,"loc":{"start":{"line":1,"column":0},"end":{"line":4,"column":2}},
|
||||
"sourceType": "script",
|
||||
"interpreter": null,
|
||||
"body": [
|
||||
{
|
||||
"type": "VariableDeclaration",
|
||||
"start":0,"end":54,"loc":{"start":{"line":1,"column":0},"end":{"line":4,"column":2}},
|
||||
"declarations": [
|
||||
{
|
||||
"type": "VariableDeclarator",
|
||||
"start":4,"end":53,"loc":{"start":{"line":1,"column":4},"end":{"line":4,"column":1}},
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start":4,"end":5,"loc":{"start":{"line":1,"column":4},"end":{"line":1,"column":5},"identifierName":"x"},
|
||||
"name": "x"
|
||||
},
|
||||
"init": {
|
||||
"type": "DoExpression",
|
||||
"start":14,"end":53,"loc":{"start":{"line":1,"column":14},"end":{"line":4,"column":1}},
|
||||
"async": true,
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":17,"end":53,"loc":{"start":{"line":1,"column":17},"end":{"line":4,"column":1}},
|
||||
"body": [
|
||||
{
|
||||
"type": "VariableDeclaration",
|
||||
"start":21,"end":35,"loc":{"start":{"line":2,"column":2},"end":{"line":2,"column":16}},
|
||||
"declarations": [
|
||||
{
|
||||
"type": "VariableDeclarator",
|
||||
"start":25,"end":34,"loc":{"start":{"line":2,"column":6},"end":{"line":2,"column":15}},
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start":25,"end":28,"loc":{"start":{"line":2,"column":6},"end":{"line":2,"column":9},"identifierName":"tmp"},
|
||||
"name": "tmp"
|
||||
},
|
||||
"init": {
|
||||
"type": "CallExpression",
|
||||
"start":31,"end":34,"loc":{"start":{"line":2,"column":12},"end":{"line":2,"column":15}},
|
||||
"callee": {
|
||||
"type": "Identifier",
|
||||
"start":31,"end":32,"loc":{"start":{"line":2,"column":12},"end":{"line":2,"column":13},"identifierName":"f"},
|
||||
"name": "f"
|
||||
},
|
||||
"arguments": []
|
||||
}
|
||||
}
|
||||
],
|
||||
"kind": "let"
|
||||
},
|
||||
{
|
||||
"type": "ExpressionStatement",
|
||||
"start":38,"end":51,"loc":{"start":{"line":3,"column":2},"end":{"line":3,"column":15}},
|
||||
"expression": {
|
||||
"type": "BinaryExpression",
|
||||
"start":38,"end":51,"loc":{"start":{"line":3,"column":2},"end":{"line":3,"column":15}},
|
||||
"left": {
|
||||
"type": "BinaryExpression",
|
||||
"start":38,"end":47,"loc":{"start":{"line":3,"column":2},"end":{"line":3,"column":11}},
|
||||
"left": {
|
||||
"type": "Identifier",
|
||||
"start":38,"end":41,"loc":{"start":{"line":3,"column":2},"end":{"line":3,"column":5},"identifierName":"tmp"},
|
||||
"name": "tmp"
|
||||
},
|
||||
"operator": "*",
|
||||
"right": {
|
||||
"type": "Identifier",
|
||||
"start":44,"end":47,"loc":{"start":{"line":3,"column":8},"end":{"line":3,"column":11},"identifierName":"tmp"},
|
||||
"name": "tmp"
|
||||
}
|
||||
},
|
||||
"operator": "+",
|
||||
"right": {
|
||||
"type": "NumericLiteral",
|
||||
"start":50,"end":51,"loc":{"start":{"line":3,"column":14},"end":{"line":3,"column":15}},
|
||||
"extra": {
|
||||
"rawValue": 1,
|
||||
"raw": "1"
|
||||
},
|
||||
"value": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"kind": "let"
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,7 @@
|
||||
"init": {
|
||||
"type": "DoExpression",
|
||||
"start":8,"end":76,"loc":{"start":{"line":1,"column":8},"end":{"line":5,"column":1}},
|
||||
"async": false,
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":11,"end":76,"loc":{"start":{"line":1,"column":11},"end":{"line":5,"column":1}},
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
"init": {
|
||||
"type": "DoExpression",
|
||||
"start":8,"end":47,"loc":{"start":{"line":1,"column":8},"end":{"line":4,"column":1}},
|
||||
"async": false,
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":11,"end":47,"loc":{"start":{"line":1,"column":11},"end":{"line":4,"column":1}},
|
||||
|
||||
@@ -28,6 +28,10 @@
|
||||
"argument": {
|
||||
"type": "JSXElement",
|
||||
"start":32,"end":216,"loc":{"start":{"line":3,"column":4},"end":{"line":14,"column":10}},
|
||||
"extra": {
|
||||
"parenthesized": true,
|
||||
"parenStart": 26
|
||||
},
|
||||
"openingElement": {
|
||||
"type": "JSXOpeningElement",
|
||||
"start":32,"end":37,"loc":{"start":{"line":3,"column":4},"end":{"line":3,"column":9}},
|
||||
@@ -90,6 +94,7 @@
|
||||
"expression": {
|
||||
"type": "DoExpression",
|
||||
"start":69,"end":197,"loc":{"start":{"line":6,"column":8},"end":{"line":12,"column":9}},
|
||||
"async": false,
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":72,"end":197,"loc":{"start":{"line":6,"column":11},"end":{"line":12,"column":9}},
|
||||
@@ -173,11 +178,7 @@
|
||||
},
|
||||
"value": "\n "
|
||||
}
|
||||
],
|
||||
"extra": {
|
||||
"parenthesized": true,
|
||||
"parenStart": 26
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
"expression": {
|
||||
"type": "DoExpression",
|
||||
"start":9,"end":42,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":42}},
|
||||
"async": false,
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":12,"end":42,"loc":{"start":{"line":1,"column":12},"end":{"line":1,"column":42}},
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
"expression": {
|
||||
"type": "DoExpression",
|
||||
"start":34,"end":75,"loc":{"start":{"line":2,"column":11},"end":{"line":2,"column":52}},
|
||||
"async": false,
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":37,"end":75,"loc":{"start":{"line":2,"column":14},"end":{"line":2,"column":52}},
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
"expression": {
|
||||
"type": "DoExpression",
|
||||
"start":9,"end":49,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":49}},
|
||||
"async": false,
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":12,"end":49,"loc":{"start":{"line":1,"column":12},"end":{"line":1,"column":49}},
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
"expression": {
|
||||
"type": "DoExpression",
|
||||
"start":9,"end":36,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":36}},
|
||||
"async": false,
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":12,"end":36,"loc":{"start":{"line":1,"column":12},"end":{"line":1,"column":36}},
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
"expression": {
|
||||
"type": "DoExpression",
|
||||
"start":9,"end":38,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":38}},
|
||||
"async": false,
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":12,"end":38,"loc":{"start":{"line":1,"column":12},"end":{"line":1,"column":38}},
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
"expression": {
|
||||
"type": "DoExpression",
|
||||
"start":9,"end":78,"loc":{"start":{"line":1,"column":9},"end":{"line":4,"column":1}},
|
||||
"async": false,
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":12,"end":78,"loc":{"start":{"line":1,"column":12},"end":{"line":4,"column":1}},
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
"expression": {
|
||||
"type": "DoExpression",
|
||||
"start":9,"end":38,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":38}},
|
||||
"async": false,
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":12,"end":38,"loc":{"start":{"line":1,"column":12},"end":{"line":1,"column":38}},
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
"expression": {
|
||||
"type": "DoExpression",
|
||||
"start":9,"end":28,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":28}},
|
||||
"async": false,
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":12,"end":28,"loc":{"start":{"line":1,"column":12},"end":{"line":1,"column":28}},
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
"expression": {
|
||||
"type": "DoExpression",
|
||||
"start":9,"end":41,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":41}},
|
||||
"async": false,
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":12,"end":41,"loc":{"start":{"line":1,"column":12},"end":{"line":1,"column":41}},
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
"expression": {
|
||||
"type": "DoExpression",
|
||||
"start":34,"end":68,"loc":{"start":{"line":2,"column":11},"end":{"line":2,"column":45}},
|
||||
"async": false,
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":37,"end":68,"loc":{"start":{"line":2,"column":14},"end":{"line":2,"column":45}},
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
"expression": {
|
||||
"type": "DoExpression",
|
||||
"start":9,"end":59,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":59}},
|
||||
"async": false,
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":12,"end":59,"loc":{"start":{"line":1,"column":12},"end":{"line":1,"column":59}},
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
"expression": {
|
||||
"type": "DoExpression",
|
||||
"start":9,"end":31,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":31}},
|
||||
"async": false,
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":12,"end":31,"loc":{"start":{"line":1,"column":12},"end":{"line":1,"column":31}},
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
"expression": {
|
||||
"type": "DoExpression",
|
||||
"start":9,"end":31,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":31}},
|
||||
"async": false,
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":12,"end":31,"loc":{"start":{"line":1,"column":12},"end":{"line":1,"column":31}},
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
"expression": {
|
||||
"type": "DoExpression",
|
||||
"start":9,"end":18,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":18}},
|
||||
"async": false,
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":12,"end":18,"loc":{"start":{"line":1,"column":12},"end":{"line":1,"column":18}},
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
"expression": {
|
||||
"type": "DoExpression",
|
||||
"start":9,"end":46,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":46}},
|
||||
"async": false,
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":12,"end":46,"loc":{"start":{"line":1,"column":12},"end":{"line":1,"column":46}},
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
"expression": {
|
||||
"type": "DoExpression",
|
||||
"start":9,"end":38,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":38}},
|
||||
"async": false,
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":12,"end":38,"loc":{"start":{"line":1,"column":12},"end":{"line":1,"column":38}},
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
"expression": {
|
||||
"type": "DoExpression",
|
||||
"start":9,"end":27,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":27}},
|
||||
"async": false,
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":12,"end":27,"loc":{"start":{"line":1,"column":12},"end":{"line":1,"column":27}},
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
"expression": {
|
||||
"type": "DoExpression",
|
||||
"start":9,"end":33,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":33}},
|
||||
"async": false,
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":12,"end":33,"loc":{"start":{"line":1,"column":12},"end":{"line":1,"column":33}},
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
"expression": {
|
||||
"type": "DoExpression",
|
||||
"start":9,"end":94,"loc":{"start":{"line":1,"column":9},"end":{"line":7,"column":1}},
|
||||
"async": false,
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":12,"end":94,"loc":{"start":{"line":1,"column":12},"end":{"line":7,"column":1}},
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
"expression": {
|
||||
"type": "DoExpression",
|
||||
"start":9,"end":83,"loc":{"start":{"line":1,"column":9},"end":{"line":7,"column":1}},
|
||||
"async": false,
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":12,"end":83,"loc":{"start":{"line":1,"column":12},"end":{"line":7,"column":1}},
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
"expression": {
|
||||
"type": "DoExpression",
|
||||
"start":9,"end":117,"loc":{"start":{"line":1,"column":9},"end":{"line":5,"column":1}},
|
||||
"async": false,
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":12,"end":117,"loc":{"start":{"line":1,"column":12},"end":{"line":5,"column":1}},
|
||||
@@ -50,12 +51,12 @@
|
||||
"start":22,"end":26,"loc":{"start":{"line":2,"column":8},"end":{"line":2,"column":12},"identifierName":"JSON"},
|
||||
"name": "JSON"
|
||||
},
|
||||
"computed": false,
|
||||
"property": {
|
||||
"type": "Identifier",
|
||||
"start":27,"end":32,"loc":{"start":{"line":2,"column":13},"end":{"line":2,"column":18},"identifierName":"parse"},
|
||||
"name": "parse"
|
||||
},
|
||||
"computed": false
|
||||
}
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@@ -95,12 +96,12 @@
|
||||
"start":64,"end":71,"loc":{"start":{"line":3,"column":18},"end":{"line":3,"column":25},"identifierName":"console"},
|
||||
"name": "console"
|
||||
},
|
||||
"computed": false,
|
||||
"property": {
|
||||
"type": "Identifier",
|
||||
"start":72,"end":77,"loc":{"start":{"line":3,"column":26},"end":{"line":3,"column":31},"identifierName":"error"},
|
||||
"name": "error"
|
||||
},
|
||||
"computed": false
|
||||
}
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
"expression": {
|
||||
"type": "DoExpression",
|
||||
"start":9,"end":109,"loc":{"start":{"line":1,"column":9},"end":{"line":5,"column":1}},
|
||||
"async": false,
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":12,"end":109,"loc":{"start":{"line":1,"column":12},"end":{"line":5,"column":1}},
|
||||
@@ -50,12 +51,12 @@
|
||||
"start":22,"end":26,"loc":{"start":{"line":2,"column":8},"end":{"line":2,"column":12},"identifierName":"JSON"},
|
||||
"name": "JSON"
|
||||
},
|
||||
"computed": false,
|
||||
"property": {
|
||||
"type": "Identifier",
|
||||
"start":27,"end":32,"loc":{"start":{"line":2,"column":13},"end":{"line":2,"column":18},"identifierName":"parse"},
|
||||
"name": "parse"
|
||||
},
|
||||
"computed": false
|
||||
}
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@@ -94,12 +95,12 @@
|
||||
"start":57,"end":64,"loc":{"start":{"line":3,"column":18},"end":{"line":3,"column":25},"identifierName":"console"},
|
||||
"name": "console"
|
||||
},
|
||||
"computed": false,
|
||||
"property": {
|
||||
"type": "Identifier",
|
||||
"start":65,"end":70,"loc":{"start":{"line":3,"column":26},"end":{"line":3,"column":31},"identifierName":"error"},
|
||||
"name": "error"
|
||||
},
|
||||
"computed": false
|
||||
}
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
"expression": {
|
||||
"type": "DoExpression",
|
||||
"start":9,"end":82,"loc":{"start":{"line":1,"column":9},"end":{"line":4,"column":1}},
|
||||
"async": false,
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":12,"end":82,"loc":{"start":{"line":1,"column":12},"end":{"line":4,"column":1}},
|
||||
@@ -50,12 +51,12 @@
|
||||
"start":22,"end":26,"loc":{"start":{"line":2,"column":8},"end":{"line":2,"column":12},"identifierName":"JSON"},
|
||||
"name": "JSON"
|
||||
},
|
||||
"computed": false,
|
||||
"property": {
|
||||
"type": "Identifier",
|
||||
"start":27,"end":32,"loc":{"start":{"line":2,"column":13},"end":{"line":2,"column":18},"identifierName":"parse"},
|
||||
"name": "parse"
|
||||
},
|
||||
"computed": false
|
||||
}
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@@ -94,12 +95,12 @@
|
||||
"start":57,"end":64,"loc":{"start":{"line":3,"column":18},"end":{"line":3,"column":25},"identifierName":"console"},
|
||||
"name": "console"
|
||||
},
|
||||
"computed": false,
|
||||
"property": {
|
||||
"type": "Identifier",
|
||||
"start":65,"end":70,"loc":{"start":{"line":3,"column":26},"end":{"line":3,"column":31},"identifierName":"error"},
|
||||
"name": "error"
|
||||
},
|
||||
"computed": false
|
||||
}
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
"expression": {
|
||||
"type": "DoExpression",
|
||||
"start":9,"end":37,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":37}},
|
||||
"async": false,
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start":12,"end":37,"loc":{"start":{"line":1,"column":12},"end":{"line":1,"column":37}},
|
||||
|
||||
Reference in New Issue
Block a user