Prefix length minimum confounded me for hours #230
andreweades
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I found that Prefix(where:) defaulting to a zero minimum length unintuitive.
I needed to use this form as the final catch-all in a OneOf to get anything that was not parsed as a specific token:
I can't see how a minimum length of zero is useful though as it ends up in an infinite loop as zero length sequence matches all the time but never the input.
Beta Was this translation helpful? Give feedback.
All reactions