Hejsil / mecha

A parser combinator library for Zig
MIT License
413 stars 18 forks source link

return Result([]const u8) instead of Result(void) from string parser #48

Closed jrachele closed 1 year ago

jrachele commented 1 year ago

Similarly to this issue: https://github.com/Hejsil/mecha/issues/42, the string parser returning Void on success is not congruent with the other parsers.

Now on success, the parser will return the string along with the rest, unless discarded via .discard()

Hejsil commented 1 year ago

Seems mecha did not compile with the latest zig version. I've fixed that, so can you rebase on master?

Hejsil commented 1 year ago

Thanks :+1:

jrachele commented 1 year ago

Cheers!