Open gustavoaca1997 opened 5 years ago
It's not clear to me that this is a good idea in general. We don't know if continuing after an error is a sensible thing to do at all, so it would only be a heuristic, which makes me concerned about adding this behavoiur to the core of Alex.
Could you explain to me more what do you mean by "sensible thing"? And thanks for the reply. I'd be glad helping in any other good first issue 🙂
Take an example like this: ... "\xfffffff" ...
with a Haskell lexer. The character constant in the string is a lexical error because it's out of range, but if we report the error and continue, the lexer doesn't know we're inside a string, so it will be out of step and will probably report a ton more errors for the rest of the input.
I have this idea for #144. What do you think, @simonmar ? A problem I don't know how to solve is that it is only reporting one lexical error per line.