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