(&mut self, node: Node<'t>, depth: u32)
| 1281 | } |
| 1282 | |
| 1283 | fn scan_fn_ref_subtree(&mut self, node: Node<'t>, depth: u32) { |
| 1284 | stack_guard!(); |
| 1285 | if depth > 12 { |
| 1286 | return; |
| 1287 | } |
| 1288 | if depth > 0 |
| 1289 | && matches!( |
| 1290 | node.kind(), |
| 1291 | "function_item" | "function_signature_item" | "arrow_function" |
| 1292 | | "function_expression" | "lambda_literal" | "lambda_expression" |
| 1293 | ) |
| 1294 | { |
| 1295 | return; |
| 1296 | } |
| 1297 | self.maybe_capture_fn_refs(node); |
| 1298 | for i in 0..node.named_child_count() { |
| 1299 | if let Some(c) = node.named_child(i) { |
| 1300 | self.scan_fn_ref_subtree(c, depth + 1); |
| 1301 | } |
| 1302 | } |
| 1303 | } |
| 1304 | |
| 1305 | fn flush_fn_ref_candidates(&mut self) { |
| 1306 | let cands = std::mem::take(&mut self.fn_ref_cands); |
no test coverage detected