Followup: Candidates for range syntax
This is a followup to #1402 which was merged in #1608. The merged implementation only includes range variants for many and fold. More parsers were mentioned as candidates in #1402.
This issue tracks the status of those candidates for conversion to a range syntax.
Current candidates
- [ ] take_till* (take_till, take_till1)
- [ ] take_while* (take_while, take_while1, take_while_m_n)
- [ ] take_until* (take_until, take_until1)
- [ ] many_till
- [ ] seperated_list* (seperated_list0, seperated_list1)
I'm less sure about converting those right now, because they rely on specialized implementations (the split_at_position* methods) to make most parsers fast, but maybe those methods could be generalized
One way to handle this is to dispatch to different implementations like my complete/streaming work, hoping the compiler inlines enough to remove the overhead.
separated_list could be a good target for this
+1 for a separated_list that accepts an additional range argument like 2..10.
Currently, there is only separated_list0 and separated_list1. If you wanted say separated_list2 you'd have to add more stuff like wrapping it in a separated_pair, duplicating the parser and separator, and mapping to push the first item onto the Vec of the rest. If you wanted a separated_list21to42 you'd probably need to dive down and implement it yourself.
All multi parsers accepting a range argument would be very nice!