Beispiel #1
0
 public static ExprOperator CreateOperator(ExpressionKind exprKind, CType type, Expr arg1, Expr arg2)
 {
     Debug.Assert(arg1 != null);
     Debug.Assert(exprKind.IsUnaryOperator() == (arg2 == null));
     return(exprKind.IsUnaryOperator()
         ? (ExprOperator)CreateUnaryOp(exprKind, type, arg1)
         : CreateBinop(exprKind, type, arg1, arg2));
 }
Beispiel #2
0
 public ExprOperator CreateOperator(ExpressionKind exprKind, CType pType, Expr pArg1, Expr pOptionalArg2)
 {
     Debug.Assert(pArg1 != null);
     Debug.Assert(exprKind.IsUnaryOperator() ? pOptionalArg2 == null : pOptionalArg2 != null);
     return(exprKind.IsUnaryOperator()
         ? (ExprOperator)CreateUnaryOp(exprKind, pType, pArg1)
         : CreateBinop(exprKind, pType, pArg1, pOptionalArg2));
 }
 public ExprUnaryOp(ExpressionKind kind, CType type, Expr operand)
     : base(kind, type)
 {
     Debug.Assert(kind.IsUnaryOperator());
     Debug.Assert(operand != null);
     Child = operand;
 }
Beispiel #4
0
        public ExprUnaryOp CreateUnaryOp(ExpressionKind exprKind, CType pType, Expr pOperand)
        {
            Debug.Assert(exprKind.IsUnaryOperator());
            Debug.Assert(pOperand != null);
            ExprUnaryOp rval = new ExprUnaryOp(exprKind, pType);

            rval.Child = pOperand;
            return(rval);
        }
 public ExprUnaryOp(ExpressionKind kind, CType type, Expr operand, Expr call, MethPropWithInst userMethod)
     : base(kind, type, call, userMethod)
 {
     Debug.Assert(kind.IsUnaryOperator());
     Debug.Assert(operand != null);
     Debug.Assert(type != null);
     Debug.Assert(call != null);
     Debug.Assert(userMethod != null);
     Child = operand;
 }
Beispiel #6
0
 protected ExprOperator(ExpressionKind kind, CType type)
     : base(kind, type)
 {
     Debug.Assert(kind.IsUnaryOperator() || kind > ExpressionKind.TypeLimit);
 }
Beispiel #7
0
 public ExprUnaryOp(ExpressionKind kind, CType type)
     : base(kind, type)
 {
     Debug.Assert(kind.IsUnaryOperator());
 }