(node: Node, visit: (node: Node) => boolean)
| 876 | } |
| 877 | |
| 878 | export const walk = (node: Node, visit: (node: Node) => boolean): void => { |
| 879 | if (visit(node)) forEachChild(node, child => walk(child, visit)) |
| 880 | } |
| 881 | |
| 882 | const forEachChild = (node: Node, f: (child: Node) => void) => { |
| 883 | for (const k of visitorKeys[node.type]) { |
no test coverage detected