spicy icon indicating copy to clipboard operation
spicy copied to clipboard

Consider adding a `&until-excluding` attributes for `bytes` parsing

Open bbannier opened this issue 4 years ago • 0 comments

bytes currently support parsing with &until and &until-including where both forms consume the delimiter. We should consider adding a &until-excluding which parses until a delimiter, but does not consume it (so that it could e.g., be consumed by another parser later).

A concrete use case would be a protocol were a certain field would start with a magic byte, and we would like to parse bytes before that field in a way that the field parser can still consume the magic byte later.

bbannier avatar Nov 02 '21 12:11 bbannier