Helper to recursively yield the matches.
(self, nodes, count)
| 892 | return count, r |
| 893 | |
| 894 | def _recursive_matches(self, nodes, count) -> Iterator[tuple[int, _Results]]: |
| 895 | """Helper to recursively yield the matches.""" |
| 896 | assert self.content is not None |
| 897 | if count >= self.min: |
| 898 | yield 0, {} |
| 899 | if count < self.max: |
| 900 | for alt in self.content: |
| 901 | for c0, r0 in generate_matches(alt, nodes): |
| 902 | for c1, r1 in self._recursive_matches(nodes[c0:], count + 1): |
| 903 | r = {} |
| 904 | r.update(r0) |
| 905 | r.update(r1) |
| 906 | yield c0 + c1, r |
| 907 | |
| 908 | |
| 909 | class NegatedPattern(BasePattern): |
no test coverage detected