mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 21:05:56 -05:00
Fixed boolean OR never being parsed
This commit is contained in:
@@ -240,15 +240,15 @@ namespace hex::lang {
|
||||
|
||||
// (parseBooleanOr) ? (parseBooleanOr) : (parseBooleanOr)
|
||||
ASTNode* Parser::parseTernaryConditional() {
|
||||
auto node = this->parseBooleanXor();
|
||||
auto node = this->parseBooleanOr();
|
||||
|
||||
while (MATCHES(sequence(OPERATOR_TERNARYCONDITIONAL))) {
|
||||
auto second = this->parseBooleanXor();
|
||||
auto second = this->parseBooleanOr();
|
||||
|
||||
if (!MATCHES(sequence(OPERATOR_INHERIT)))
|
||||
throwParseError("expected ':' in ternary expression");
|
||||
|
||||
auto third = this->parseBooleanXor();
|
||||
auto third = this->parseBooleanOr();
|
||||
node = new ASTNodeTernaryExpression(node, second, third, Token::Operator::TernaryConditional);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user