Пример #1
0
        public ExprQuestionMark CreateQuestionMark(Expr pTestExpression, ExprBinOp pConsequence)
        {
            Debug.Assert(pTestExpression != null);
            Debug.Assert(pConsequence != null);

            ExprQuestionMark pResult = new ExprQuestionMark();

            pResult.TestExpression = pTestExpression;
            pResult.Consequence    = pConsequence;
            return(pResult);
        }
Пример #2
0
        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.OptionalLeftChild != null);
                pType = pConsequence.OptionalLeftChild.Type;
                Debug.Assert(pType != null);
            }
            ExprQuestionMark pResult = new ExprQuestionMark();

            pResult.Kind           = ExpressionKind.EK_QUESTIONMARK;
            pResult.Type           = pType;
            pResult.Flags          = 0;
            pResult.TestExpression = pTestExpression;
            pResult.Consequence    = pConsequence;
            Debug.Assert(pResult != null);
            return(pResult);
        }
Пример #3
0
 protected virtual Expr VisitQUESTIONMARK(ExprQuestionMark pExpr)
 {
     return(VisitEXPR(pExpr));
 }