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

Method _parse_module

Parser/asdl.py:285–296  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

283 return self._parse_module()
284
285 def _parse_module(self):
286 if self._at_keyword('module'):
287 self._advance()
288 else:
289 raise ASDLSyntaxError(
290 'Expected "module" (found {})'.format(self.cur_token.value),
291 self.cur_token.lineno)
292 name = self._match(self._id_kinds)
293 self._match(TokenKind.LBrace)
294 defs = self._parse_definitions()
295 self._match(TokenKind.RBrace)
296 return Module(name, defs)
297
298 def _parse_definitions(self):
299 defs = []

Callers 1

parseMethod · 0.95

Calls 7

_at_keywordMethod · 0.95
_advanceMethod · 0.95
_matchMethod · 0.95
_parse_definitionsMethod · 0.95
ASDLSyntaxErrorClass · 0.85
ModuleClass · 0.70
formatMethod · 0.45

Tested by

no test coverage detected