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

Function generate_ast_state

Parser/asdl_c.py:2245–2251  ·  view source on GitHub ↗
(module_state, f)

Source from the content-addressed store, hash-verified

2243
2244
2245def generate_ast_state(module_state, f):
2246 f.write('struct ast_state {\n')
2247 f.write(' _PyOnceFlag once;\n')
2248 f.write(' int finalized;\n')
2249 for s in module_state:
2250 f.write(' PyObject *' + s + ';\n')
2251 f.write('};')
2252
2253
2254def generate_ast_fini(module_state, f):

Callers 1

generate_module_defFunction · 0.85

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…