Example #1
0
        public object VisitAssign(Expression.Assign expression)
        {
            var value = Evaluate(expression.Value);

            _environment.Assign(expression.Name, value);
            return(value);
        }
Example #2
0
 public string VisitAssign(Expression.Assign expression)
 {
     return(expression.Name.Lexeme + "=" + expression.Accept(this));
 }