diff --git a/stdx/d/lexer.d b/stdx/d/lexer.d index cbff766..2b355e0 100644 --- a/stdx/d/lexer.d +++ b/stdx/d/lexer.d @@ -399,8 +399,8 @@ public struct DLexer { import core.vararg; - mixin Lexer!(IdType, Token, lexIdentifier, isSeparating, operators, - dynamicTokens, pseudoTokenHandlers, keywords); + mixin Lexer!(Token, lexIdentifier, isSeparating, pseudoTokenHandlers, + operators, dynamicTokens, keywords); this(ubyte[] range, const LexerConfig config, StringCache* cache) { diff --git a/stdx/lexer.d b/stdx/lexer.d index 541f739..7ab33ff 100644 --- a/stdx/lexer.d +++ b/stdx/lexer.d @@ -368,10 +368,11 @@ public: * } * --- */ -mixin template Lexer(IDType, Token, alias defaultTokenFunction, - alias tokenSeparatingFunction, alias staticTokens, alias dynamicTokens, - alias tokenHandlers, alias possibleDefaultTokens) +mixin template Lexer(Token, alias defaultTokenFunction, + alias tokenSeparatingFunction, alias tokenHandlers, + alias staticTokens, alias dynamicTokens, alias possibleDefaultTokens) { + alias IDType = typeof(Token.type); static assert (tokenHandlers.length % 2 == 0, "Each pseudo-token must" ~ " have a corresponding handler function name.");