| 217 | |
| 218 | |
| 219 | class Required(BranchPattern): |
| 220 | |
| 221 | def match(self, left, collected=None): |
| 222 | collected = [] if collected is None else collected |
| 223 | l = left |
| 224 | c = collected |
| 225 | for pattern in self.children: |
| 226 | matched, l, c = pattern.match(l, c) |
| 227 | if not matched: |
| 228 | return False, left, collected |
| 229 | return True, l, c |
| 230 | |
| 231 | |
| 232 | class Optional(BranchPattern): |
no outgoing calls
no test coverage detected