Beispiel #1
0
 public CodeSelfIncrement(CodeValueReference exp)
 {
     this.exp = exp;
     if (!exp.IsNumber)
     {
         throw new InvalidOperationException("Operator '++' cannot be applied to operand of type '" + exp.GetResultType().FullName + "'");
     }
 }
		public CodeAddOne (CodeValueReference exp)
		{
			this.exp = exp;
			if (!exp.IsNumber) {
				incMet = exp.GetResultType ().GetMethod ("op_Increment");
				if (incMet == null)
					throw new InvalidOperationException ("Operator '++' cannot be applied to operand of type '" + exp.GetResultType().FullName + "'");
			}
		}
 public CodeAssignment(CodeValueReference var, CodeExpression exp)
 {
     if (var == null)
         throw new ArgumentNullException ("var");
     if (exp == null)
         throw new ArgumentNullException ("exp");
     this.exp = exp;
     this.var = var;
 }
Beispiel #4
0
		public CodeAddOne (CodeValueReference exp)
		{
			this.exp = exp;
			if (!exp.IsNumber) {
				incMet = exp.GetResultType ().GetMethod ("op_Increment");
				if (incMet == null)
					throw new InvalidOperationException ("Operator '++' cannot be applied to operand of type '" + exp.GetResultType().FullName + "'");
			}
		}
Beispiel #5
0
 public CodeAssignment(CodeValueReference var, CodeExpression exp)
 {
     if (var == null)
     {
         throw new ArgumentNullException("var");
     }
     if (exp == null)
     {
         throw new ArgumentNullException("exp");
     }
     this.exp = exp;
     this.var = var;
 }
Beispiel #6
0
		public static CodeValueReference Inc (CodeValueReference e)
		{
			return new CodeIncrement (e);
		} 
Beispiel #7
0
 public void Dec(CodeValueReference val)
 {
     Assign(val, new CodeDecrement(val));
 }
Beispiel #8
0
 public void Assign(CodeValueReference var, CodeExpression val)
 {
     currentBlock.Add(new CodeAssignment(var, val));
 }
		public CodeIncrement (CodeValueReference exp)
		{
			this.exp = exp;
		}
Beispiel #10
0
 public static CodeValueReference Inc(CodeValueReference e)
 {
     return(new CodeIncrement(e));
 }
Beispiel #11
0
 public CodeIncrement(CodeValueReference exp)
 {
     this.exp = exp;
 }
		public void Dec (CodeValueReference val)
		{
			Assign (val, new CodeDecrement (val));
		}
		public void Assign (CodeValueReference var, CodeExpression val)
		{
			currentBlock.Add (new CodeAssignment (var, val)); 
		}
Beispiel #14
0
		public CodeSelfIncrement (CodeValueReference exp)
		{
			this.exp = exp;
			if (!exp.IsNumber)
				throw new InvalidOperationException ("Operator '++' cannot be applied to operand of type '" + exp.GetResultType().FullName + "'");
		}