You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, I'm working on my own language using this parser, and all the error recovery options appear to be for skipping/removing/consuming tokens. I'm not sure if what I am thinking is the proper way to go about it, but if I have a language construct like a function arguments my_function(1, 2, 3) and I miss a comma my_function(1, 2 3) I think that the proper move here would be an error recovery strategy that would add a , comma token and see if that fixed the input. I don't know though, thoughts?
The text was updated successfully, but these errors were encountered:
I think the best approach here would probably be to attempt to parse the correct pattern, and then fall back to a lot lenient parser that tries to deal with such errors, generating an error in the process. This should be possible with the new recovery strategy introduced in #233.
Closing because the approach chumsky takes when performing error recovery is to generalise parsers over erroneous inputs and emit ancillary errors in the process instead of trying to 'fix' the original input.
Hey, I'm working on my own language using this parser, and all the error recovery options appear to be for skipping/removing/consuming tokens. I'm not sure if what I am thinking is the proper way to go about it, but if I have a language construct like a function arguments
my_function(1, 2, 3)
and I miss a commamy_function(1, 2 3)
I think that the proper move here would be an error recovery strategy that would add a,
comma token and see if that fixed the input. I don't know though, thoughts?The text was updated successfully, but these errors were encountered: