1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 22:28:12 +00:00

LibJS: Fix logical expressions

The current implementation of logical AND (&&) and logical OR (||)
always returns a boolean - this is not correct.
This commit is contained in:
Linus Groh 2020-04-03 14:33:28 +01:00 committed by Andreas Kling
parent a58640ce6b
commit 6e5f9e20eb
3 changed files with 94 additions and 5 deletions

View file

@ -889,7 +889,9 @@ bool Parser::match_secondary_expression() const
|| type == TokenType::QuestionMark
|| type == TokenType::Ampersand
|| type == TokenType::Pipe
|| type == TokenType::Caret;
|| type == TokenType::Caret
|| type == TokenType::DoubleAmpersand
|| type == TokenType::DoublePipe;
}
bool Parser::match_statement() const