Example #1
0
        protected override DObject GetValue()
        {
            var lastVariable = Interpreter.current.evaluator.lastVariable;
            var result       = getter.Call(new DObject[0]);

            Interpreter.current.evaluator.lastVariable = lastVariable;
            return(result);
        }
Example #2
0
        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 }));
        }