Hejsil / mecha

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

Merge many and manyRange into a single function that takes options #23

Closed Hejsil closed 3 years ago

Hejsil commented 3 years ago

This change also allows many to "collect" the results into an arraylist and return a slice of results instead of just the parsed string. To get the old behavior, one can still set collect to false. many and manyN now both also take a separator parse, for parsing things that separates elements. This function defaults to noop.

closes #21