MCPcopy Index your code
hub / github.com/python/cpython / start

Method start

Tools/peg_generator/pegen/grammar_parser.py:45–55  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

43
44 @memoize
45 def start(self) -> Optional[Grammar]:
46 # start: grammar $
47 mark = self._mark()
48 if (
49 (grammar := self.grammar())
50 and
51 (_endmarker := self.expect('ENDMARKER'))
52 ):
53 return grammar
54 self._reset(mark)
55 return None
56
57 @memoize
58 def grammar(self) -> Optional[Grammar]:

Callers

nothing calls this directly

Calls 3

grammarMethod · 0.95
expectMethod · 0.45
_resetMethod · 0.45

Tested by

no test coverage detected