Diff
Not logged in

Differences From Artifact [fb4085e84f38ed6a]:

To Artifact [e43d60d2bdfc662b]:


44 assert( !__traits(compiles, p.column =222) ); 44 assert( !__traits(compiles, p.column =222) ); 45 } 45 } 46 46 47 /// Represents a lexer token 47 /// Represents a lexer token 48 48 49 class Token 49 class Token 50 { 50 { > 51 /// currently we have three kinds of token 51 enum Kind {identifier, stringLiteral, number}; | 52 enum Kind { > 53 identifier, /// anything other than others > 54 stringLiteral, /// "string literal" > 55 number /// 42 > 56 }; 52 immutable LexPosition pos; /// position where the token occurred in the 57 immutable LexPosition pos; /// position where the token occurred in the 53 immutable string str; /// the token string itself 58 immutable string str; /// the token string itself 54 immutable Kind kind; /// which kind of token? 59 immutable Kind kind; /// which kind of token? 55 60 56 mixin SimpleConstructor; 61 mixin SimpleConstructor; 57 mixin SimpleCompare; 62 mixin SimpleCompare; 58 } 63 }