Move lexer debugging logic out of public header