(&mut self, node: Node<'t>, depth: u32)
| 1193 | } |
| 1194 | |
| 1195 | fn scan_fn_ref_subtree(&mut self, node: Node<'t>, depth: u32) { |
| 1196 | if depth > 12 { |
| 1197 | return; |
| 1198 | } |
| 1199 | // (functionTypes is empty for Java; lambda_expression halts the scan) |
| 1200 | if depth > 0 && matches!(node.kind(), "lambda_literal" | "lambda_expression") { |
| 1201 | return; |
| 1202 | } |
| 1203 | self.maybe_capture_fn_refs(node); |
| 1204 | for i in 0..node.named_child_count() { |
| 1205 | if let Some(c) = node.named_child(i) { |
| 1206 | self.scan_fn_ref_subtree(c, depth + 1); |
| 1207 | } |
| 1208 | } |
| 1209 | } |
| 1210 | |
| 1211 | fn flush_fn_ref_candidates(&mut self) { |
| 1212 | let cands = std::mem::take(&mut self.fn_ref_cands); |
no test coverage detected