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

Function parse_function_statics

Tools/c-analyzer/c_parser/parser/_func_body.py:190–209  ·  view source on GitHub ↗
(source, func, anon_name)

Source from the content-addressed store, hash-verified

188
189
190def parse_function_statics(source, func, anon_name):
191 # For now we do not worry about locals declared in for loop "headers".
192 depth = 1;
193 while depth > 0:
194 for srcinfo in source:
195 m = LOCAL_STATICS_RE.match(srcinfo.text)
196 if m:
197 break
198 else:
199 # We ran out of lines.
200 if srcinfo is not None:
201 srcinfo.done()
202 return
203 for item, depth in _parse_next_local_static(m, srcinfo,
204 anon_name, func, depth):
205 if callable(item):
206 parse_body = item
207 yield from parse_body(source)
208 elif item is not None:
209 yield item
210
211
212def _parse_next_local_static(m, srcinfo, anon_name, func, depth):

Callers

nothing calls this directly

Calls 4

_parse_next_local_staticFunction · 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…