* Recursively collect all Ref names from an AST node.
(node: ASTNode, out: Set<string>)
| 78 | * Recursively collect all Ref names from an AST node. |
| 79 | */ |
| 80 | function collectRefs(node: ASTNode, out: Set<string>): void { |
| 81 | walkAST(node, (current) => { |
| 82 | if (current.k === "Ref") out.add(current.n); |
| 83 | if (current.k === "RuntimeRef") out.add(current.n); |
| 84 | }); |
| 85 | } |
| 86 | |
| 87 | /** |
| 88 | * Remove statements unreachable from `root` (garbage collection). |
no test coverage detected