Is there an ergonomic way to mix ModalResult and Result parsers? #769
-
I have a set of parse functions that mostly return However there are one or two cases where I want the parsing to stop immediately, mostly for sensible error reporting. In this case I believe I should use As far as I can tell, this requires any parse function that calls this parse function to also return Is there a way to more easily mix these parsers, or is the design intention that "migration to ModalResult" implies that all parse functions are changed to return Or am I better off just biting the bullet and changing them all to |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
If you can't find another way to structure your parser (e.g. with |
Beta Was this translation helpful? Give feedback.
If you can't find another way to structure your parser (e.g. with
dispatch!
) then you need to switchModalResult
to carry yourcut_err
up the stack.