fix corner case with for [await]...of (#4872)
This commit is contained in:
@@ -1240,6 +1240,7 @@ function parse($TEXT, options) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function for_enum(ctor, init) {
|
function for_enum(ctor, init) {
|
||||||
|
handle_regexp();
|
||||||
var obj = expression();
|
var obj = expression();
|
||||||
expect(")");
|
expect(")");
|
||||||
return new ctor({
|
return new ctor({
|
||||||
|
|||||||
@@ -852,6 +852,20 @@ for_async_of: {
|
|||||||
node_version: ">=0.12 <16"
|
node_version: ">=0.12 <16"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for_of_regexp: {
|
||||||
|
input: {
|
||||||
|
for (var a of /foo/);
|
||||||
|
}
|
||||||
|
expect_exact: "for(var a of/foo/);"
|
||||||
|
}
|
||||||
|
|
||||||
|
for_await_of_regexp: {
|
||||||
|
input: {
|
||||||
|
for await (var a of /foo/);
|
||||||
|
}
|
||||||
|
expect_exact: "for await(var a of/foo/);"
|
||||||
|
}
|
||||||
|
|
||||||
issue_3631_1: {
|
issue_3631_1: {
|
||||||
options = {
|
options = {
|
||||||
dead_code: true,
|
dead_code: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user