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); }
protected override EXPR VisitQUESTIONMARK(EXPRQUESTIONMARK pExpr) { Debug.Assert(pExpr != null); Debug.Assert(alwaysRewrite || currentAnonMeth != null); EXPR p1 = Visit(pExpr.GetTestExpression()); EXPR p2 = GenerateQuestionMarkOperand(pExpr.GetConsequence().asBINOP().GetOptionalLeftChild()); EXPR p3 = GenerateQuestionMarkOperand(pExpr.GetConsequence().asBINOP().GetOptionalRightChild()); return GenerateCall(PREDEFMETH.PM_EXPRESSION_CONDITION, p1, p2, p3); }
protected virtual EXPR VisitQUESTIONMARK(EXPRQUESTIONMARK pExpr) { return(VisitEXPR(pExpr)); }
protected virtual EXPR VisitQUESTIONMARK(EXPRQUESTIONMARK pExpr) { return VisitEXPR(pExpr); }
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; }