Markus Westerlind

Results 358 comments of Markus Westerlind

There are basically two ways of doing this. * Pass the state to the combinators directly This is easy and fairly flexible but has the downside that the state needs...

https://github.com/Marwes/combine/tree/user_state / https://github.com/Marwes/combine/commit/48137f71c853f8607510dc568f6def32942599b4 contains an example of the second way. It may get merged into combine after some polish.

You are trying to use a parser that demands `state::Stream` where you only provide one on `Input`. In the error ``` impl combine::Parser: combine::Parser ``` So your outer `function_name_or_type_name` parser...

As the error message says, it is a compiler error so not necessarily something you did wrong (at least I can't see anything obvious). You can try the nightly compiler...

There are some combinators which boxes and hides the type of PartialState https://docs.rs/combine/4.2.1/combine/parser/combinator/fn.any_send_sync_partial_state.html https://docs.rs/combine/4.2.1/combine/parser/combinator/fn.any_partial_state.html . There are also https://docs.rs/combine/4.2.1/combine/parser/combinator/fn.no_partial.html which makes `PartialState = ()` which effectively disables partial parsing inside...

The way I have done this is like this in redis-rs https://github.com/mitsuhiko/redis-rs/blob/75bfe24f7f34faad2460343699bd65bdcfaabaf0/src/parser.rs#L213-L282 . I always meant to port that code into a more generalized form in combine but I kept...

It is on master now, releasing in 4.0 in a few days.

Sorry, I should have linked explicitly to what I ported over. With the added `decode_buf_read!` macro you just construct the added `Decoder` struct with a `std::io::BufRead` and call the macro...

Figured out a way to relax the `BufRead` requirement and making the decoding more efficient by handling all buffering internally. The `decode*` macros therefore loses the `_buf_read` suffix and you...

This is about setting up a test which checks the docs automatically so it doesn't regress.