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

Class SequenceConstructorVisitor

Parser/asdl_c.py:720–736  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

718
719
720class SequenceConstructorVisitor(EmitVisitor):
721 def visitModule(self, mod):
722 for dfn in mod.dfns:
723 self.visit(dfn)
724
725 def visitType(self, type):
726 self.visit(type.value, type.name)
727
728 def visitProduct(self, prod, name):
729 self.emit_sequence_constructor(name, get_c_type(name))
730
731 def visitSum(self, sum, name):
732 if not is_simple(sum):
733 self.emit_sequence_constructor(name, get_c_type(name))
734
735 def emit_sequence_constructor(self, name, type):
736 self.emit(f"GENERATE_ASDL_SEQ_CONSTRUCTOR({name}, {type})", depth=0)
737
738class PyTypesDeclareVisitor(PickleVisitor):
739

Callers 1

write_sourceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…