Closed tmbb closed 7 years ago
Hmm, yeah something like alt
could easily do something like that, and though it would slow it down 'slightly' I don't think it would be enough to really matter (only an extra binding and Cons call per failed case). This would not be at all hard to do, hmm...
Added it in, might need refining, but it shows it all for now. :-)
Currently error messages are a little bit crude:
The error message is accurate, but I think we can do better. This is inside an
alt()
parser, so we should make it clearer to the user that we tried to parser not only?y
but alsox
. Merely concatenating the messages of the child parsers and reporting the error at the level of thealt()
parser would be a great improvement.What do you think?
Obviously not a priority right now. I think the priority should be documenting the undocumented parts of the parser and maybe add some tests.