Diff
Not logged in

Differences From Artifact [9cdb01160429b059]:

To Artifact [2827b7df74d1df19]:


19 immutable int lineno; /// 1-origin 19 immutable int lineno; /// 1-origin 20 immutable int column; /// 1-origin 20 immutable int column; /// 1-origin 21 21 22 mixin SimpleClass; 22 mixin SimpleClass; 23 override string toString() const 23 override string toString() const 24 { return sprintf!("%s:%d:%d")(filename, lineno, column); } 24 { return sprintf!("%s:%d:%d")(filename, lineno, column); } 25 static LexPosition dummy; 25 static LexPosition dummy; 26 static this(){ dummy = new LexPosition("<unnamed>",0,0); } | 26 static this(){ dummy = new LexPosition("<nowhere>",0,0); } 27 } 27 } 28 28 29 unittest 29 unittest 30 { 30 { 31 auto p = new LexPosition("hello.cpp", 123, 45); 31 auto p = new LexPosition("hello.cpp", 123, 45); 32 32 33 assert_eq( p.filename, "hello.cpp" ); 33 assert_eq( p.filename, "hello.cpp" );