public object VisitAssignExpr(Expr.Assign expr) { object value = Evaluate(expr.Value); int?distance = _locals[expr]; if (distance != null) { _environment.AssignAt((int)distance, expr.Name, value); } else { Globals.Assign(expr.Name, value); } return(value); }
public object VisitAssignExpr(Expr.Assign expr) { Resolve(expr.Value); ResolveLocal(expr, expr.Name); return(null); }
public string Visit(Expr.Assign expr) { throw new NotImplementedException(); }