mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 14:24:10 +02:00
Fixed CheckBinaryOperatorPrecedence with partial conditional expression
This commit is contained in:
parent
4e27903fe5
commit
edd7005c62
1 changed files with 3 additions and 0 deletions
|
@ -1133,6 +1133,9 @@ BfExpression* BfReducer::CheckBinaryOperatorPrecedence(BfBinaryOperatorExpressio
|
||||||
bool didCondSwap = false;
|
bool didCondSwap = false;
|
||||||
while (auto rightCondExpression = BfNodeDynCast<BfConditionalExpression>(checkBinOpExpression->mRight))
|
while (auto rightCondExpression = BfNodeDynCast<BfConditionalExpression>(checkBinOpExpression->mRight))
|
||||||
{
|
{
|
||||||
|
if (rightCondExpression->mTrueExpression == NULL)
|
||||||
|
break;
|
||||||
|
|
||||||
// Turn (A || (B ? C : D)) into ((A || B) ? C : D)
|
// Turn (A || (B ? C : D)) into ((A || B) ? C : D)
|
||||||
|
|
||||||
BfExpression* exprA = checkBinOpExpression->mLeft;
|
BfExpression* exprA = checkBinOpExpression->mLeft;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue