Visitor function. Args: node: Node Returns: bool, whether the node should be revisited; subclasses can visit every reachable node exactly once by always returning False
(self, node)
| 179 | |
| 180 | # TODO(mdan): Rename to flow? |
| 181 | def visit_node(self, node): |
| 182 | """Visitor function. |
| 183 | |
| 184 | Args: |
| 185 | node: Node |
| 186 | Returns: |
| 187 | bool, whether the node should be revisited; subclasses can visit every |
| 188 | reachable node exactly once by always returning False |
| 189 | """ |
| 190 | raise NotImplementedError('Subclasses must implement this.') |
| 191 | |
| 192 | def reset(self): |
| 193 | self.in_ = { |