combine
combine copied to clipboard
How to get errors inside a loop?
I'm building a compiler using this awesome lib, then sometimes I need get a error message from on parser inside of many
, sequence
or something like it.
For example, in this situation it works:
Combine.parse("ABC", fatal("something wrong happened!")) # {:error, "something wrong happened!"}
But, if I use many
, for example, I can't get this error message
Combine.parse("ABC", many(fail("something wrong happened!"))) # [[]]
How to get the error message?