Open olson-sean-k opened 11 months ago
Repetitions that occur at the beginning of a glob expression are the only example I can think of where this occurs. Note that rooted alternatives are forbidden at the beginning of an expression, so for example {/root}
cannot occur at time of writing. However, that rule is intended to prevent overlapping trees and arguably alternatives at the beginning of an expression with only one rooting branch should be permitted.
So the documentation should be sure to mention the exception here: tree tokens (i.e., alternatives and repetitions) with roots at the beginning of an expression. Note also that when this occurs the path part is necessarily empty.
At time of writing, the documentation for
Glob::partition
says:But this isn't true! There is at least one exception I'm aware of, which are expressions beginning with a rooted repetition. For example,
</root:1,>
.