rust-bakery / nom

Rust parser combinator framework
MIT License
9.18k stars 792 forks source link

stipulate `sep` parser must consume #1723

Closed gdennie closed 2 months ago

gdennie commented 5 months ago

separated_list1 by multipspace0 sep failed #1691

the sep parser in the separated_list parser combinators cannot be "any" parser but must be a consuming parser, contrary to documentation. Ideally, we should have a trait to assert this constraint as well but better clarity in the documentation helps.

Geal commented 2 months ago

thank you, it's a good idea to be explicit about it