chumsky
chumsky copied to clipboard
request: ignore_until primitive
It looks like if you use take_until( ).ignored() the actual taking still makes a vec internally, it just throws it away after filling it up.
but heck maybe this is already done in zero-copy i dunno
An idea I had recently was to generalise a lot of these "pull tokens until x" patterns with an and_is
and not
combinator. In such a formulation, you'd just do:
x.not().ignored().repeated().then(x)
It's a bit wordier, but it IMO it generalises to more cases and the common ones can always be wrapped up in a more ergonomic combinator. I will take this onboard and do a bit of thinking read for zero-copy
.