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

Method visitField

Parser/asdl_c.py:313–325  ·  view source on GitHub ↗
(self, field, depth)

Source from the content-addressed store, hash-verified

311 self.emit("", depth)
312
313 def visitField(self, field, depth):
314 # XXX need to lookup field.type, because it might be something
315 # like a builtin...
316 ctype = get_c_type(field.type)
317 name = field.name
318 if field.seq:
319 if field.type in self.metadata.simple_sums:
320 self.emit("asdl_int_seq *%(name)s;" % locals(), depth)
321 else:
322 _type = field.type
323 self.emit("asdl_%(_type)s_seq *%(name)s;" % locals(), depth)
324 else:
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)

Callers

nothing calls this directly

Calls 2

emitMethod · 0.95
get_c_typeFunction · 0.85

Tested by

no test coverage detected