protected override DObject GetValue() { var lastVariable = Interpreter.current.evaluator.lastVariable; var result = getter.Call(new DObject[0]); Interpreter.current.evaluator.lastVariable = lastVariable; return(result); }
protected override DObject SetValue(DObject value) { if (setter == null) { throw Interpreter.current.Exception("Attempt to write to read-only variable"); } return(setter.Call(new DObject[] { value })); }