MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / scan_fn_ref_subtree

Method scan_fn_ref_subtree

codegraph-kernel/src/dart.rs:2420–2443  ·  view source on GitHub ↗
(&mut self, node: Node<'t>, depth: u32)

Source from the content-addressed store, hash-verified

2418 }
2419
2420 fn scan_fn_ref_subtree(&mut self, node: Node<'t>, depth: u32) {
2421 stack_guard!();
2422 if depth > 12 {
2423 return;
2424 }
2425 // Halt list: functionTypes (function_signature) + the lambda kinds —
2426 // function_expression IS dart's lambda, so constant-initializer
2427 // lambdas don't leak candidates.
2428 if depth > 0
2429 && matches!(
2430 node.kind(),
2431 "function_signature" | "arrow_function" | "function_expression"
2432 | "lambda_literal" | "lambda_expression"
2433 )
2434 {
2435 return;
2436 }
2437 self.maybe_capture_fn_refs(node);
2438 let mut cursor = node.walk();
2439 let children: Vec<Node<'t>> = node.named_children(&mut cursor).collect();
2440 for c in children {
2441 self.scan_fn_ref_subtree(c, depth + 1);
2442 }
2443 }
2444
2445 fn flush_fn_ref_candidates(&mut self) {
2446 let cands = std::mem::take(&mut self.fn_ref_cands);

Callers 1

visitMethod · 0.45

Calls 3

maybe_capture_fn_refsMethod · 0.45
walkMethod · 0.45
collectMethod · 0.45

Tested by

no test coverage detected