Пример #1
0
        public ExprUserLogicalOp CreateUserLogOp(CType pType, Expr pCallTF, ExprCall pCallOp)
        {
            Debug.Assert(pCallTF != null);
            Debug.Assert(pCallOp != null);
            Debug.Assert(pCallOp.OptionalArguments != null);
            Debug.Assert(pCallOp.OptionalArguments.isLIST());
            Debug.Assert(pCallOp.OptionalArguments.asLIST().OptionalElement != null);
            ExprUserLogicalOp rval = new ExprUserLogicalOp();
            Expr leftChild         = pCallOp.OptionalArguments.asLIST().OptionalElement;

            Debug.Assert(leftChild != null);
            if (leftChild.isWRAP())
            {
                // In the EE case, we don't create WRAPEXPRs.
                leftChild = leftChild.asWRAP().OptionalExpression;
                Debug.Assert(leftChild != null);
            }
            rval.Kind                  = ExpressionKind.EK_USERLOGOP;
            rval.Type                  = pType;
            rval.Flags                 = EXPRFLAG.EXF_ASSGOP;
            rval.TrueFalseCall         = pCallTF;
            rval.OperatorCall          = pCallOp;
            rval.FirstOperandToExamine = leftChild;
            Debug.Assert(rval != null);
            return(rval);
        }