public object visitSetExpr(Expr.Set expr) { object object_ = evaluate(expr.object_); if (!(object_ is LoxInstance)) { throw new RuntimeError(expr.name, "Only instances have fields."); } object value = evaluate(expr.value); ((LoxInstance)object_).set(expr.name, value); return(value); }
public string visitSetExpr(Expr.Set expr) { return(""); }
public object visitSetExpr(Expr.Set expr) { resolve(expr.value); resolve(expr.object_); return(null); }