parse dynamic import correctly (#4671)
This commit is contained in:
@@ -848,8 +848,10 @@ function parse($TEXT, options) {
|
||||
next();
|
||||
return export_();
|
||||
case "import":
|
||||
next();
|
||||
return import_();
|
||||
if (!is_token(peek(), "punc", "(")) {
|
||||
next();
|
||||
return import_();
|
||||
}
|
||||
case "yield":
|
||||
if (S.in_generator) return simple_statement();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user