combine icon indicating copy to clipboard operation
combine copied to clipboard

How to get errors inside a loop?

Open macabeus opened this issue 6 years ago • 0 comments

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?

macabeus avatar Jan 25 '18 00:01 macabeus