Exemplo n.º 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 + "'");
			}
		}
Exemplo n.º 3
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;
 }
Exemplo n.º 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 + "'");
			}
		}
Exemplo n.º 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;
 }
Exemplo n.º 6
0
Arquivo: Exp.cs Projeto: nickchal/pash
		public static CodeValueReference Inc (CodeValueReference e)
		{
			return new CodeIncrement (e);
		} 
Exemplo n.º 7
0
 public void Dec(CodeValueReference val)
 {
     Assign(val, new CodeDecrement(val));
 }
Exemplo n.º 8
0
 public void Assign(CodeValueReference var, CodeExpression val)
 {
     currentBlock.Add(new CodeAssignment(var, val));
 }
		public CodeIncrement (CodeValueReference exp)
		{
			this.exp = exp;
		}
Exemplo n.º 10
0
Arquivo: Exp.cs Projeto: zgramana/mono
 public static CodeValueReference Inc(CodeValueReference e)
 {
     return(new CodeIncrement(e));
 }
Exemplo n.º 11
0
 public CodeIncrement(CodeValueReference exp)
 {
     this.exp = exp;
 }
Exemplo n.º 12
0
		public void Dec (CodeValueReference val)
		{
			Assign (val, new CodeDecrement (val));
		}
Exemplo n.º 13
0
		public void Assign (CodeValueReference var, CodeExpression val)
		{
			currentBlock.Add (new CodeAssignment (var, val)); 
		}
Exemplo n.º 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 + "'");
		}