bitwalker / bitwalker/combine

How to get errors inside a loop?

Open
#44 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Elixir
Stars
200
Forks
20
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.