mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibJS: Handle "for" statements with empty initializer and updater
This commit is contained in:
Notes:
sideshowbarker
2024-07-19 08:08:02 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/6c9d2cfa5e1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user