public object VisitSetExpr(Expr.Set expr) { object objekt = Evaluate(expr.Objekt); if (!(objekt is BasilInstance)) { throw new RuntimeError(expr.Name, "Only instances have fields."); } object value = Evaluate(expr.Value); ((BasilInstance)objekt).Set(expr.Name, value); return(value); }
public string VisitSetExpr(Expr.Set expr) { throw new System.NotImplementedException(); }
public object VisitSetExpr(Expr.Set expr) { Resolve(expr.Value); Resolve(expr.Objekt); return(null); }