parse import.meta correctly (#4836)

This commit is contained in:
Alex Lam S.L
2021-04-02 21:31:29 +01:00
committed by GitHub
parent e755d01a0b
commit cf38b52afa
4 changed files with 21 additions and 3 deletions

View File

@@ -854,7 +854,8 @@ function parse($TEXT, options) {
next();
return export_();
case "import":
if (!is_token(peek(), "punc", "(")) {
var token = peek();
if (!(token.type == "punc" && /^[(.]$/.test(token.value))) {
next();
return import_();
}