On 2016-08-04 09:15, Lodovico Giaretta wrote:
I don't know if it is what you want, but you can do this:auto lexer = chooseLexer!input; The function chooseLexer creates the most suitable lexer type based on the input type. You can test if a type is a lexer using the trait isLexer defined in std.experimental.interfaces.
Please see my reply to Robert .  http://forum.dlang.org/post/nnv6gt$sbe$1...@digitalmars.com -- /Jacob Carlborg