Beispiel #1
0
 public EventAddOrRemove(Expression target, Binary.Operator op, Expression source, Location loc)
 {
     this.target = target as EventExpr;
     this.op     = op;
     this.source = source;
     this.loc    = loc;
 }
Beispiel #2
0
        public Binary.PredefinedOperator[] GetPredefinedEnumAritmeticOperators(TypeSpec enumType, bool nullable)
        {
            TypeSpec underlying;

            Binary.Operator mask = 0;

            if (nullable)
            {
                underlying = Nullable.NullableInfo.GetEnumUnderlyingType(this, enumType);
                mask       = Binary.Operator.NullableMask;
            }
            else
            {
                underlying = EnumSpec.GetUnderlyingType(enumType);
            }

            var operators = new[] {
                new Binary.PredefinedOperator(enumType, underlying,
                                              mask | Binary.Operator.AdditionMask | Binary.Operator.SubtractionMask | Binary.Operator.DecomposedMask, enumType),
                new Binary.PredefinedOperator(underlying, enumType,
                                              mask | Binary.Operator.AdditionMask | Binary.Operator.SubtractionMask | Binary.Operator.DecomposedMask, enumType),
                new Binary.PredefinedOperator(enumType, mask | Binary.Operator.SubtractionMask, underlying)
            };

            return(operators);
        }
Beispiel #3
0
		public CompoundAssign (Binary.Operator op, Expression target, Expression source)
			: base (target, source, target.Location)
		{
			right = source;
			this.op = op;
		}
 public CompoundAssign(Binary.Operator op, Expression target, Expression source, Expression left)
     : this(op, target, source)
 {
     this.left = left;
 }
 public CompoundAssign(Binary.Operator op, Expression target, Expression source)
     : base(target, source, target.Location)
 {
     right   = source;
     this.op = op;
 }
Beispiel #6
0
 public LiftedBinaryOperator(Binary.Operator op, Expression left, Expression right, Location loc)
     : base(op, left, right, loc)
 {
 }
Beispiel #7
0
 public LiftedBinaryOperator(Binary.Operator op, Expression left, Expression right)
     : base(op, left, right)
 {
 }
Beispiel #8
0
		public EventAddOrRemove (Expression target, Binary.Operator op, Expression source, Location loc)
		{
			this.target = target as EventExpr;
			this.op = op;
			this.source = source;
			this.loc = loc;
		}
Beispiel #9
0
		public DynamicBinaryExpression (Binary.Operator oper, string name, Arguments args, Location loc)
			: base (null, args, loc)
		{
			this.oper = oper;
			this.name = name;
			base.binder = this;
		}
		//
		// We assume that `l' is always a pointer
		//
		public PointerArithmetic (Binary.Operator op, Expression l, Expression r, Type t, Location loc)
		{
			type = t;
			this.loc = loc;
			left = l;
			right = r;
			this.op = op;
		}