public DereferenceField(Expression obj, String field)
 {
     Object = obj;
     Field = field;
 }
        private void ApplyIncrementDecrement(Expression exp, OpCode op)
        {
            exp.Visit(this);
            //visit the identifier again, as the right hand side of an assignment so we emit the OpCodes for loading onto the stack
            new Identifier(null, _lastWalkedIdentifier).Visit(this);

            _gen.Emit(OpCodes.Ldc_I4_1);
            _gen.Emit(op);
            //store this back to the location
            ApplyAssignmentCallback();
        }
 public Increment(Expression inc)
 {
     Expression = inc;
 }
        private InternalType TypeCheckIncrementDecrement(Expression expr, string operatorName, LexLocation loc)
        {
            if (!(expr is Identifier))
            {
                ReportError(loc, "The {0} operator requires an instance of a numeric datatype", operatorName);
                throw new Exception(string.Format("The {0} operator requires an instance of a numeric datatype", operatorName));
            }

            var identifier = (Identifier)expr;
            identifier.IsLeftHandSide = true;

            var t = CheckSubTree(identifier);
            if (t.IsNumeric)
                return t;

            ReportError(loc, "The {0} operator requires an instance of a numeric datatype", operatorName);
            throw new Exception(string.Format("The {0} operator requires an instance of a numeric datatype", operatorName));
        }
Example #5
0
 public Invoke(Expression obj, SpecialFunction func)
 {
     Object = obj;
     SpecialFunc = func;
 }
Example #6
0
 public Invoke(Expression obj, String method, ExpressionList actuals)
 {
     Object = obj;
     Method = method;
     Actuals = actuals;
 }
 public Qualifier(string type, Expression e)
 {
     Type = type;
     Expression = e;
 }
Example #8
0
 public Assign(LValue lval, Expression exp)
 {
     lval.IsLeftHandSide = true;
     LValue = lval;
     Expr = exp;
 }
 public StatementExpression(Expression exp)
 {
     Expression = exp;
 }