mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-04 15:19:42 +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
Notes:
sideshowbarker
2024-07-19 07:58:37 +09:00
Author: https://github.com/linusg
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