Diff
Not logged in

Differences From Artifact [eb7f695558db6c0f]:

To Artifact [2eb228662dba6e2d]:


18 18 { 19 19 } 20 20 21 21 class UndefinedValue : Value 22 22 { 23 23 mixin SimpleConstructor; 24 24 mixin SimpleCompare; 25 + override string toString() const { return "(undefined)"; } 25 26 } 26 27 27 28 class IntValue : Value 28 29 { 29 30 BigInt data; 30 31 mixin SimpleConstructor; 31 32 mixin SimpleCompare; 33 + override string toString() const { 34 + const(char)[] cs; data.toString((const(char)[] s){cs=s;}, null); 35 + return to!string(cs); 36 + } 32 37 } 33 38 34 39 class StrValue : Value 35 40 { 36 41 string data; 37 42 mixin SimpleConstructor; 38 43 mixin SimpleCompare; 44 + override string toString() const { return data; } 39 45 } 40 46 41 47 class FunValue : Value 42 48 { 43 49 Value delegate(immutable LexPosition pos, Value[]) data; 44 50 mixin SimpleConstructor; 45 51 Value call(immutable LexPosition pos, Value[] args) { return data(pos,args); } 52 + override string toString() const { return sprintf!"(function:%s:%s)"(data.ptr,data.funcptr); } 46 53 } 47 54 import std.stdio; 48 55 class Context 49 56 { 50 57 Context parent; 51 58 Value[string] table; 52 59 this(Context parent = null) { this.parent = parent; }