- handle trinary conditional statement.

This commit is contained in:
Christoph Oelckers 2016-10-17 21:43:14 +02:00
parent a6a0c4b93c
commit 1c21dbc44c

View file

@ -2503,6 +2503,16 @@ FxExpression *ZCCCompiler::ConvertNode(ZCC_TreeNode *ast)
}
break;
}
case AST_ExprTrinary:
{
auto trinary = static_cast<ZCC_ExprTrinary *>(ast);
auto condition = ConvertNode(trinary->Test);
auto left = ConvertNode(trinary->Left);
auto right = ConvertNode(trinary->Right);
return new FxConditional(condition, left, right);
}
}
// only for development. I_Error is more convenient here than a normal error.