Return the visitor function for this node or `None` if no visitor exists for this node. In that case the generic visit function is used instead.
(self, node: Node)
| 26 | """ |
| 27 | |
| 28 | def get_visitor(self, node: Node) -> "t.Optional[VisitCallable]": |
| 29 | """Return the visitor function for this node or `None` if no visitor |
| 30 | exists for this node. In that case the generic visit function is |
| 31 | used instead. |
| 32 | """ |
| 33 | return getattr(self, f"visit_{type(node).__name__}", None) |
| 34 | |
| 35 | def visit(self, node: Node, *args: t.Any, **kwargs: t.Any) -> t.Any: |
| 36 | """Visit a node.""" |