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

Method scan_fn_ref_subtree

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

Source from the content-addressed store, hash-verified

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);

Callers 1

visit_nodeMethod · 0.45

Calls 1

maybe_capture_fn_refsMethod · 0.45

Tested by

no test coverage detected