masala-parser
masala-parser copied to clipboard
F.tryAll()
Instead of F.try(F.try(x).or(y)).or(z) or F.try(x).or(F.try(y)).orz(), we could use F.tryAll(x, y, z)
The parser try(x.or(y)).or(z) is enough. In your proposition, You mix Try and Or in the same construction and I think this is error-prone.
No pull request?
Oups :smile: Let me revert that.
I will make the tryAll snippet in the documentation so that people can use it if they like. Personally, I prefer it for the kind of job I do. But you are right, it's way better to keep this low-level, well separated.
As there is very few development, I tend to push on dev and make the PR on master