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

Method from_pattern

preprocessor/docopt.py:289–292  ·  view source on GitHub ↗
(source)

Source from the content-addressed store, hash-verified

287
288 @staticmethod
289 def from_pattern(source):
290 source = re.sub(r'([\[\]\(\)\|]|\.\.\.)', r' \1 ', source)
291 source = [s for s in re.split('\s+|(\S*<.*?>)', source) if s]
292 return Tokens(source, error=DocoptLanguageError)
293
294 def move(self):
295 return self.pop(0) if len(self) else None

Callers 1

parse_patternFunction · 0.80

Calls 1

TokensClass · 0.85

Tested by

no test coverage detected