LibJS: Handle "for" statements with empty initializer and updater

This commit is contained in:
Andreas Kling
2020-03-25 16:14:18 +01:00
parent 30d24af54a
commit 6c9d2cfa5e
3 changed files with 26 additions and 2 deletions

View File

@@ -612,7 +612,7 @@ NonnullRefPtr<ForStatement> Parser::parse_for_statement()
RefPtr<Expression> update;
switch (m_current_token.type()) {
case TokenType::Semicolon:
case TokenType::ParenClose:
break;
default:
update = parse_expression(0);