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

Method match

preprocessor/docopt.py:221–229  ·  view source on GitHub ↗
(self, left, collected=None)

Source from the content-addressed store, hash-verified

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

nothing calls this directly

Calls 1

matchMethod · 0.45

Tested by

no test coverage detected