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

Function parse_body

Tools/c-analyzer/c_parser/parser/_func_body.py:235–248  ·  view source on GitHub ↗
(source)

Source from the content-addressed store, hash-verified

233 f'{inline_leading or ""} {inline_pre or ""} {kind} {name}'
234 )
235 def parse_body(source):
236 _parse_body = DECL_BODY_PARSERS[kind]
237
238 data = [] # members
239 ident = f'{kind} {name}'
240 for item in _parse_body(source, anon_name, ident):
241 if item.kind == 'field':
242 data.append(item)
243 else:
244 yield item
245 # XXX Should "parent" really be None for inline type decls?
246 yield srcinfo.resolve(kind, data, name, parent=None)
247
248 srcinfo.resume()
249 yield parse_body, depth
250
251 elif static_decl:

Callers 1

parse_function_staticsFunction · 0.70

Calls 3

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…