v0.1.4
Adds conditional parsing to struct fields - both through the existing #[peek]
and #[peek_with]
attributes, as well as the new #[parse_if]
attribute. A new section in the README gives a brief example.
To briefly elaborate on the motivation here:
A pattern that tends to come up in complex Parse
implementations is having optional fields. Most of these conditions boil down to either (1) peeking, or (2) some expression based on what's already been parsed. I've already found that I wanted to allow this behavior in my personal use, so it's now a feature!