Marwes / combine

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

Offset parser #342

Open r4v3n6101 opened 2 years ago

r4v3n6101 commented 2 years ago

Hello! Previously, I asked to make an offset function parsing data located by some offset. Finally, I've found time to do this one. But we should discuss the feature because look_ahead(skip_count(count).with(parser)) does same thing as offset. Does the combine really need the new parser? If so then it closes #337.

r4v3n6101 commented 2 years ago

First, my thanks to @Marwes for approving first PR of mine. Second topic I'd like to discuss is naming of this parser. offset seems to me as very abstract and general word: it may be shadowed with everything - other function named offset or some random variable. What about by_offset or parse_by_offset?