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

Function parse_globals

Tools/c-analyzer/c_parser/parser/_global.py:37–53  ·  view source on GitHub ↗
(source, anon_name)

Source from the content-addressed store, hash-verified

35
36
37def parse_globals(source, anon_name):
38 for srcinfo in source:
39 m = GLOBAL_RE.match(srcinfo.text)
40 if not m:
41 # We need more text.
42 continue
43 for item in _parse_next(m, srcinfo, anon_name):
44 if callable(item):
45 parse_body = item
46 yield from parse_body(source)
47 else:
48 yield item
49 else:
50 # We ran out of lines.
51 if srcinfo is not None:
52 srcinfo.done()
53 return
54
55
56def _parse_next(m, srcinfo, anon_name):

Callers 1

_parseFunction · 0.85

Calls 4

_parse_nextFunction · 0.85
parse_bodyFunction · 0.70
matchMethod · 0.45
doneMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…