public EXPRQUESTIONMARK CreateQuestionMark(EXPR pTestExpression, EXPRBINOP pConsequence)
{
Debug.Assert(pTestExpression != null);
Debug.Assert(pConsequence != null);
CType pType = pConsequence.type;
if (pType == null)
{
Debug.Assert(pConsequence.GetOptionalLeftChild() != null);
pType = pConsequence.GetOptionalLeftChild().type;
Debug.Assert(pType != null);
}
EXPRQUESTIONMARK pResult = new EXPRQUESTIONMARK();
pResult.kind = ExpressionKind.EK_QUESTIONMARK;
pResult.type = pType;
pResult.flags = 0;
pResult.SetTestExpression(pTestExpression);
pResult.SetConsequence(pConsequence);
Debug.Assert(pResult != null);
return pResult;
}