You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: parsing local version with digit followed by non-digits (bazel-contrib#3032)
When parsing the local identifier segment of `<digit><letter>` the
parser would
give an error saying the letter was unexpected.
What was happening was `accept_digits()` consumed up to the first
non-digit, and
considered this success, which prevented calling `accept_alnum()` to
finish
the parsing.
To fix, only call `accept_alnum()`, then post-process the value to
normalize
an all-digit segment.
I'm guessing `accept_digits()` stopping at the first non-digit is WAI
because
it expects to parse e.g. "3.14b", where the caller handles subsequent
characters.
Along the way, some minor doc improvements to the parser code.
Fixesbazel-contrib#3030
0 commit comments