Open cenodis opened 1 year ago
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!
This is a followup to #1402 which was merged in #1608. The merged implementation only includes range variants for
many
andfold
. More parsers were mentioned as candidates in #1402.This issue tracks the status of those candidates for conversion to a range syntax.
Current candidates