Marwes / combine

A parser combinator library for Rust
https://docs.rs/combine/*/combine/
MIT License
1.29k stars 92 forks source link

feat: Implement then_ref/ThenRef combinator #287

Closed wrl closed 4 years ago

wrl commented 4 years ago

ThenRef is similar to Then, except it passes a reference to the input value rather than passing ownership. Then, it combines the input value with the output value of the closure in a 2-tuple.

This makes it more straightforward to have conditional parsing based on parsed values which are needed further down the combinator chain.

Marwes commented 4 years ago

Released as 4.1