fix(lexer): Add a lex error function