(node: Node)
| 81 | |
| 82 | |
| 83 | def traverse_tree(node: Node) -> Generator[Node, None, None]: |
| 84 | cursor = node.walk() |
| 85 | depth = 0 |
| 86 | |
| 87 | visited_children = False |
| 88 | while True: |
| 89 | if not visited_children: |
| 90 | yield cursor.node |
| 91 | if not cursor.goto_first_child(): |
| 92 | depth += 1 |
| 93 | visited_children = True |
| 94 | elif cursor.goto_next_sibling(): |
| 95 | visited_children = False |
| 96 | elif not cursor.goto_parent() or depth == 0: |
| 97 | break |
| 98 | else: |
| 99 | depth -= 1 |
| 100 | |
| 101 | |
| 102 | def has_return_statement(node: Node) -> bool: |
no outgoing calls
no test coverage detected