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

Function parse_body

Tools/c-analyzer/c_parser/parser/_global.py:102–115  ·  view source on GitHub ↗
(source)

Source from the content-addressed store, hash-verified

100 f'{compound_leading or ""} {compound_kind} {name}',
101 )
102 def parse_body(source):
103 _parse_body = DECL_BODY_PARSERS[compound_kind]
104
105 data = [] # members
106 ident = f'{kind} {name}'
107 for item in _parse_body(source, anon_name, ident):
108 if item.kind == 'field':
109 data.append(item)
110 else:
111 yield item
112 # XXX Should "parent" really be None for inline type decls?
113 yield srcinfo.resolve(kind, data, name, parent=None)
114
115 srcinfo.resume()
116 yield parse_body
117
118 elif typedef_decl:

Callers 1

parse_globalsFunction · 0.70

Calls 4

parse_function_bodyFunction · 0.85
appendMethod · 0.45
resolveMethod · 0.45
resumeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…