1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Fixed CheckBinaryOperatorPrecedence with partial conditional expression

This commit is contained in:
Brian Fiete 2020-12-25 15:42:04 -08:00
parent 4e27903fe5
commit edd7005c62

View file

@ -1133,6 +1133,9 @@ BfExpression* BfReducer::CheckBinaryOperatorPrecedence(BfBinaryOperatorExpressio
bool didCondSwap = false;
while (auto rightCondExpression = BfNodeDynCast<BfConditionalExpression>(checkBinOpExpression->mRight))
{
if (rightCondExpression->mTrueExpression == NULL)
break;
// Turn (A || (B ? C : D)) into ((A || B) ? C : D)
BfExpression* exprA = checkBinOpExpression->mLeft;