SmithyPattern constructor
Implementation
SmithyPattern(this.pattern, this.segments, {bool allowsGreedyLabels = true}) {
_checkForDuplicateLabels();
if (allowsGreedyLabels) {
_checkForLabelsAfterGreedyLabels();
} else if (segments.any((segment) => segment.isGreedyLabel)) {
throw InvalidPatternError(
'Pattern must not contain a greedy label. Found $pattern',
);
}
}