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)
| 24 | """ |
| 25 | |
| 26 | def get_visitor(self, node): |
| 27 | """Return the visitor function for this node or `None` if no visitor |
| 28 | exists for this node. In that case the generic visit function is |
| 29 | used instead. |
| 30 | """ |
| 31 | method = 'visit_' + node.__class__.__name__ |
| 32 | return getattr(self, method, None) |
| 33 | |
| 34 | def visit(self, node, *args, **kwargs): |
| 35 | """Visit a node.""" |