mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Argument cascades
This commit is contained in:
parent
0692fb44a4
commit
2dbcca8ca4
8 changed files with 98 additions and 8 deletions
|
@ -2250,8 +2250,15 @@ BfExpression* BfReducer::CreateExpression(BfAstNode* node, CreateExprFlags creat
|
|||
unaryOpExpr->mOp = unaryOp;
|
||||
unaryOpExpr->mOpToken = tokenNode;
|
||||
ReplaceNode(tokenNode, unaryOpExpr);
|
||||
|
||||
CreateExprFlags innerFlags = (CreateExprFlags)(rhsCreateExprFlags | CreateExprFlags_EarlyExit);
|
||||
if (unaryOp == BfUnaryOp_Cascade)
|
||||
{
|
||||
innerFlags = (CreateExprFlags)(innerFlags | (createExprFlags & CreateExprFlags_AllowVariableDecl));
|
||||
}
|
||||
|
||||
// Don't attempt binary or unary operations- they will always be lower precedence
|
||||
unaryOpExpr->mExpression = CreateExpressionAfter(unaryOpExpr, (CreateExprFlags)(rhsCreateExprFlags | CreateExprFlags_EarlyExit));
|
||||
unaryOpExpr->mExpression = CreateExpressionAfter(unaryOpExpr, innerFlags);
|
||||
if (unaryOpExpr->mExpression == NULL)
|
||||
return NULL;
|
||||
MoveNode(unaryOpExpr->mExpression, unaryOpExpr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue