@@ -858,13 +858,11 @@ function parse($TEXT, options) {
|
|||||||
next();
|
next();
|
||||||
return export_();
|
return export_();
|
||||||
case "import":
|
case "import":
|
||||||
if (!toplevel && options.module !== "") unexpected();
|
|
||||||
var token = peek();
|
var token = peek();
|
||||||
if (!(token.type == "punc" && /^[(.]$/.test(token.value))) {
|
if (token.type == "punc" && /^[(.]$/.test(token.value)) break;
|
||||||
|
if (!toplevel && options.module !== "") unexpected();
|
||||||
next();
|
next();
|
||||||
return import_();
|
return import_();
|
||||||
}
|
|
||||||
break;
|
|
||||||
case "let":
|
case "let":
|
||||||
if (is_vardefs()) {
|
if (is_vardefs()) {
|
||||||
next();
|
next();
|
||||||
|
|||||||
@@ -227,3 +227,33 @@ issue_4708_2: {
|
|||||||
import a from "foo";
|
import a from "foo";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pr_5550_1: {
|
||||||
|
input: {
|
||||||
|
if (console)
|
||||||
|
import("foo");
|
||||||
|
else
|
||||||
|
import.meta.url.replace(/bar/g, console.log);
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
if (console)
|
||||||
|
import("foo");
|
||||||
|
else
|
||||||
|
import.meta.url.replace(/bar/g, console.log);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pr_5550_2: {
|
||||||
|
input: {
|
||||||
|
L: {
|
||||||
|
import("foo");
|
||||||
|
import.meta.url.replace(/bar/g, console.log);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
L: {
|
||||||
|
import("foo");
|
||||||
|
import.meta.url.replace(/bar/g, console.log);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user