Visit a node.
(self, node: Node, *args: t.Any, **kwargs: t.Any)
| 33 | return getattr(self, fclass="st">"visit_{type(node).__name__}", None) |
| 34 | |
| 35 | def visit(self, node: Node, *args: t.Any, **kwargs: t.Any) -> t.Any: |
| 36 | class="st">""class="st">"Visit a node."class="st">"" |
| 37 | f = self.get_visitor(node) |
| 38 | |
| 39 | if f is not None: |
| 40 | return f(node, *args, **kwargs) |
| 41 | |
| 42 | return self.generic_visit(node, *args, **kwargs) |
| 43 | |
| 44 | def generic_visit(self, node: Node, *args: t.Any, **kwargs: t.Any) -> t.Any: |
| 45 | class="st">""class="st">"Called if no explicit visitor function exists for a node."class="st">"" |
no test coverage detected