public override DObject OpADD(DObject other) { return(new DString(value + other.ToString())); }
public override Member OpINDEX(DObject other) { var key = pairs.Keys.ToList().Find(x => x.Equals(other)); if (key == null) { throw new InterpreterException(Interpreter.current.CurrentToken, "No key exists: " + other.ToString()); } return(pairs[key]); }
public void Print(DObject obj) { Console.WriteLine(obj.ToString()); }
public void Write(DObject obj) { Console.Write(obj.ToString()); }
public override Member OpINDEX(DObject other) { return(GetMember(other.ToString())); //throw new Exception("A table cannot be indexed. Instead, make getter and setter methods."); }