(&mut self, node: Node<'t>, depth: u32)
| 1203 | } |
| 1204 | |
| 1205 | fn scan_fn_ref_subtree(&mut self, node: Node<'t>, depth: u32) { |
| 1206 | stack_guard!(); |
| 1207 | if depth > 12 { |
| 1208 | return; |
| 1209 | } |
| 1210 | // (functionTypes is empty for Java; lambda_expression halts the scan) |
| 1211 | if depth > 0 && matches!(node.kind(), "lambda_literal" | "lambda_expression") { |
| 1212 | return; |
| 1213 | } |
| 1214 | self.maybe_capture_fn_refs(node); |
| 1215 | for i in 0..node.named_child_count() { |
| 1216 | if let Some(c) = node.named_child(i) { |
| 1217 | self.scan_fn_ref_subtree(c, depth + 1); |
| 1218 | } |
| 1219 | } |
| 1220 | } |
| 1221 | |
| 1222 | fn flush_fn_ref_candidates(&mut self) { |
| 1223 | let cands = std::mem::take(&mut self.fn_ref_cands); |
no test coverage detected