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

Method visitProduct

Parser/asdl_c.py:327–337  ·  view source on GitHub ↗
(self, product, name, depth)

Source from the content-addressed store, hash-verified

325 self.emit("%(ctype)s %(name)s;" % locals(), depth)
326
327 def visitProduct(self, product, name, depth):
328 self.emit("struct _%(name)s {" % locals(), depth)
329 for f in product.fields:
330 self.visit(f, depth + 1)
331 for field in product.attributes:
332 # rudimentary attribute handling
333 type = str(field.type)
334 assert type in asdl.builtin_types, type
335 self.emit("%s %s;" % (type, field.name), depth + 1);
336 self.emit("};", depth)
337 self.emit("", depth)
338
339
340def ast_func_name(name):

Callers

nothing calls this directly

Calls 3

emitMethod · 0.95
strFunction · 0.85
visitMethod · 0.45

Tested by

no test coverage detected