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:
parent
a58640ce6b
commit
6e5f9e20eb
3 changed files with 94 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue