Closed baodart closed 10 months ago
Thanks for reporting this @baodart and providing a minimal reproduction 👍
There is another issue here, the valid token "5" column is reported as 1
instead of 3
I suspect that the logic to keep track of column numbers in case of lexer error recovery.
fix was released in 11.0.3 version available on npm
Here's a reproduction example:
which logs![image](https://github.com/Chevrotain/chevrotain/assets/135431588/9cdb66e4-04dc-47ac-8874-5034d4d29be1)
As the lexer can only understand whitespace and number literal, only
5
is captured as tokens here. There are 2 'unexpected character' errors: