public EXPRUNARYOP CreateUnaryOp(ExpressionKind exprKind, CType pType, EXPR pOperand)
        {
            Debug.Assert(exprKind.isUnaryOperator());
            Debug.Assert(pOperand != null);
            EXPRUNARYOP rval = new EXPRUNARYOP();

            rval.kind  = exprKind;
            rval.type  = pType;
            rval.flags = 0;
            rval.Child = pOperand;
            rval.OptionalUserDefinedCall = null;
            rval.UserDefinedCallMethod   = null;
            Debug.Assert(rval != null);
            return(rval);
        }
Beispiel #2
0
        public ExprUnaryOp CreateUnaryOp(ExpressionKind exprKind, CType pType, Expr pOperand)
        {
            Debug.Assert(exprKind.isUnaryOperator());
            Debug.Assert(pOperand != null);
            ExprUnaryOp rval = new ExprUnaryOp();

            rval.Kind  = exprKind;
            rval.Type  = pType;
            rval.Flags = 0;
            rval.Child = pOperand;
            rval.OptionalUserDefinedCall = null;
            rval.UserDefinedCallMethod   = null;
            Debug.Assert(rval != null);
            return(rval);
        }
        public EXPR CreateOperator(ExpressionKind exprKind, CType pType, EXPR pArg1, EXPR pOptionalArg2)
        {
            Debug.Assert(pArg1 != null);
            EXPR rval = null;

            if (exprKind.isUnaryOperator())
            {
                Debug.Assert(pOptionalArg2 == null);
                rval = CreateUnaryOp(exprKind, pType, pArg1);
            }
            else
            {
                rval = CreateBinop(exprKind, pType, pArg1, pOptionalArg2);
            }
            Debug.Assert(rval != null);
            return(rval);
        }
Beispiel #4
0
 public EXPR CreateOperator(ExpressionKind exprKind, CType pType, EXPR pArg1, EXPR pOptionalArg2)
 {
     Debug.Assert(pArg1 != null);
     EXPR rval = null;
     if (exprKind.isUnaryOperator())
     {
         Debug.Assert(pOptionalArg2 == null);
         rval = CreateUnaryOp(exprKind, pType, pArg1);
     }
     else
         rval = CreateBinop(exprKind, pType, pArg1, pOptionalArg2);
     Debug.Assert(rval != null);
     return rval;
 }
Beispiel #5
0
 public EXPRUNARYOP CreateUnaryOp(ExpressionKind exprKind, CType pType, EXPR pOperand)
 {
     Debug.Assert(exprKind.isUnaryOperator());
     Debug.Assert(pOperand != null);
     EXPRUNARYOP rval = new EXPRUNARYOP();
     rval.kind = exprKind;
     rval.type = pType;
     rval.flags = 0;
     rval.Child = pOperand;
     rval.OptionalUserDefinedCall = null;
     rval.UserDefinedCallMethod = null;
     Debug.Assert(rval != null);
     return (rval);
 }