Is there a way to process only on success and peek on error? #165
Answered
by
foonathan
EmmanuelMess
asked this question in
Q&A
-
I want to write code that "autobacktracks" whenever an error occurs, it seems that
is the only way. But this makes me write the same rule twice, but for the first one I have to use whitespace. If I don't use this syntax I run the risk of a series of tokens being read by the wrong production and breaking unexpectedly without recovery. (Also clangd seems annoyed that ws is two letters) |
Beta Was this translation helpful? Give feedback.
Answered by
foonathan
Jul 30, 2023
Replies: 1 comment
-
This isn't how lexy is meant to be used, so there is no easy way to get it. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
EmmanuelMess
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This isn't how lexy is meant to be used, so there is no easy way to get it.