MCPcopy Index your code
hub / github.com/RustPython/RustPython / generic_visit

Method generic_visit

Lib/ast.py:508–516  ·  view source on GitHub ↗

Called if no explicit visitor function exists for a node.

(self, node)

Source from the content-addressed store, hash-verified

506 return visitor(node)
507
508 def generic_visit(self, node):
509 """Called if no explicit visitor function exists for a node."""
510 for field, value in iter_fields(node):
511 if isinstance(value, list):
512 for item in value:
513 if isinstance(item, AST):
514 self.visit(item)
515 elif isinstance(value, AST):
516 self.visit(value)
517
518
519class NodeTransformer(NodeVisitor):

Callers 2

visit_ClassDefMethod · 0.45
visit_FunctionDefMethod · 0.45

Calls 3

visitMethod · 0.95
iter_fieldsFunction · 0.85
isinstanceFunction · 0.85

Tested by

no test coverage detected