From 557313ae1ee203e5d817e58d6e4186f0d7e715b5 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sun, 10 Jan 2021 22:52:28 +0100 Subject: [PATCH] Fixed boolean OR never being parsed --- source/lang/parser.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/lang/parser.cpp b/source/lang/parser.cpp index 53e9ec2d8..da0a61300 100644 --- a/source/lang/parser.cpp +++ b/source/lang/parser.cpp @@ -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); }