Improving the `preceded!` macro documentation
Hi!
I've just started using nom and I'd like to know if anyone could give me a better description of the preceded! macro?
If no one is available to commit the new version of its documentation, I will.
Thanks for advance!
The idea behind preceded! is that there's some part which the first argument of the macro will parse and return Ok(T) if found. T can be (), and is dropped. The second argument should be something which parses the next portion of the stream, and returns the desired output type, O, when successful.
A normal usage of preceded would be when parsing something in key:value form, you could parse
preceded!(tag!("key:"), /*value parser/*)
the preceded macro doc was already rewritten