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

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