MCPcopy Create free account
hub / github.com/PlatformLab/NanoLog / Required

Class Required

preprocessor/docopt.py:219–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217
218
219class 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
232class Optional(BranchPattern):

Callers 3

transformFunction · 0.85
parse_patternFunction · 0.85
parse_exprFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected