Пример #1
0
        public ExprBinOp CreateUserDefinedBinop(ExpressionKind exprKind, CType pType, Expr p1, Expr p2, Expr call, MethPropWithInst pmpwi)
        {
            Debug.Assert(p1 != null);
            Debug.Assert(p2 != null);
            Debug.Assert(call != null);
            ExprBinOp rval = new ExprBinOp(exprKind, pType);

            rval.Flags                   = EXPRFLAG.EXF_BINOP;
            rval.OptionalLeftChild       = p1;
            rval.OptionalRightChild      = p2;
            rval.OptionalUserDefinedCall = call;
            rval.UserDefinedCallMethod   = pmpwi;
            if (call.HasError)
            {
                rval.SetError();
            }
            return(rval);
        }
Пример #2
0
        public ExprBinOp CreateUserDefinedBinop(ExpressionKind exprKind, CType pType, Expr p1, Expr p2, Expr call, MethPropWithInst pmpwi)
        {
            Debug.Assert(p1 != null);
            Debug.Assert(p2 != null);
            Debug.Assert(call != null);
            ExprBinOp rval = new ExprBinOp();

            rval.Kind               = exprKind;
            rval.Type               = pType;
            rval.Flags              = EXPRFLAG.EXF_BINOP;
            rval.OptionalLeftChild  = p1;
            rval.OptionalRightChild = p2;
            // The call may be lifted, but we do not mark the outer binop as lifted.
            rval.IsLifted = false;
            rval.OptionalUserDefinedCall = call;
            rval.UserDefinedCallMethod   = pmpwi;
            if (call.HasError)
            {
                rval.SetError();
            }
            Debug.Assert(rval != null);
            return(rval);
        }