reject invalid for await syntax (#4847)
This commit is contained in:
@@ -1189,7 +1189,7 @@ function parse($TEXT, options) {
|
||||
var await = is("name", "await") && next();
|
||||
expect("(");
|
||||
var init = null;
|
||||
if (!is("punc", ";")) {
|
||||
if (await || !is("punc", ";")) {
|
||||
init = is("keyword", "const")
|
||||
? (next(), const_(true))
|
||||
: is("keyword", "let")
|
||||
|
||||
Reference in New Issue
Block a user