class documentation

class ReplaceTypes(Visitor): (source)

View In Hierarchy

Visitor for replacing types in a tree. This replaces both NamedType and ClassType nodes that have a name in the mapping. The two cases are not distinguished.

Method __init__ Initialize this visitor.
Method VisitClassType Undocumented
Method VisitNamedType Undocumented
Instance Variable mapping Undocumented
Instance Variable record Undocumented

Inherited from Visitor:

Method Enter Undocumented
Method Leave Undocumented
Method Visit Undocumented
Class Variable old_node Undocumented
Class Variable unchecked_node_names Undocumented
Class Variable visits_all_node_types Undocumented
Instance Variable enter_functions Undocumented
Instance Variable leave_functions Undocumented
Instance Variable visit_class_names Undocumented
Instance Variable visit_functions Undocumented
Class Variable _visitor_functions_cache Undocumented
def __init__(self, mapping, record=None): (source)

Initialize this visitor. Args: mapping: A dictionary, mapping strings to node instances. Any NamedType or ClassType with a name in this dictionary will be replaced with the corresponding value. record: Optional. A set. If given, this records which entries in the map were used.

def VisitClassType(self, node): (source)

Undocumented

def VisitNamedType(self, node): (source)

Undocumented

Undocumented

Undocumented