Пример #1
0
        public VariableAssignExpression(VariableUseExpression variableUseExpr, Expression valueExpr) : base(variableUseExpr.ReturnType)
        {
            this.variableUseExpr = variableUseExpr;
            this.valueExpr       = valueExpr;

            CheckTypes();
        }
Пример #2
0
        private UnaryArithmeticExpression(VariableUseExpression variableExpr, bool add, bool prefix) : base(variableExpr.ReturnType)
        {
            this.variableExpr = variableExpr;
            this.add          = add;
            this.prefix       = prefix;

            if (this.variableExpr.ReturnType != typeof(int) && variableExpr.ReturnType != typeof(char))
            {
                Error("Invalid expression type to increment!");
            }
        }
Пример #3
0
 public static UnaryArithmeticExpression CreatePostIncrement(VariableUseExpression variableExpr)
 {
     return(new UnaryArithmeticExpression(variableExpr, true, false));
 }