MCPcopy
hub / github.com/docopt/docopt / parse_seq

Function parse_seq

docopt.py:392–401  ·  view source on GitHub ↗

seq ::= ( atom [ '...' ] )* ;

(tokens, options)

Source from the content-addressed store, hash-verified

390
391
392def parse_seq(tokens, options):
393 """seq ::= ( atom [ '...' ] )* ;"""
394 result = []
395 while tokens.current() not in [None, ']', ')', '|']:
396 atom = parse_atom(tokens, options)
397 if tokens.current() == '...':
398 atom = [OneOrMore(*atom)]
399 tokens.move()
400 result += atom
401 return result
402
403
404def parse_atom(tokens, options):

Callers 1

parse_exprFunction · 0.85

Calls 4

parse_atomFunction · 0.85
OneOrMoreClass · 0.85
currentMethod · 0.80
moveMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…