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

Method maybe_capture_fn_refs

codegraph-kernel/src/php.rs:1383–1394  ·  view source on GitHub ↗
(&mut self, node: Node<'t>)

Source from the content-addressed store, hash-verified

1381 // --- function-as-value refs (PHP_SPEC, function-ref.ts:360) --------------------
1382
1383 fn maybe_capture_fn_refs(&mut self, node: Node<'t>) {
1384 if node.kind() != "arguments" {
1385 return;
1386 }
1387 if self.stack.is_empty() {
1388 return;
1389 }
1390 let from = self.top_row();
1391 for c in node.named_children(&mut node.walk()) {
1392 self.normalize_fn_ref_value(c, from, 0);
1393 }
1394 }
1395
1396 fn normalize_fn_ref_value(&mut self, v: Node<'t>, from: u32, depth: u32) {
1397 stack_guard!();

Callers 3

visit_nodeMethod · 0.45
scan_fn_ref_subtreeMethod · 0.45

Calls 3

top_rowMethod · 0.45
walkMethod · 0.45

Tested by

no test coverage detected