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

Method maybe_capture_fn_refs

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

Source from the content-addressed store, hash-verified

1404 // --- function-as-value refs (PHP_SPEC, function-ref.ts:360) --------------------
1405
1406 fn maybe_capture_fn_refs(&mut self, node: Node<'t>) {
1407 if node.kind() != "arguments" {
1408 return;
1409 }
1410 if self.stack.is_empty() {
1411 return;
1412 }
1413 let from = self.top_row();
1414 for i in 0..node.named_child_count() {
1415 if let Some(c) = node.named_child(i) {
1416 self.normalize_fn_ref_value(c, from, 0);
1417 }
1418 }
1419 }
1420
1421 fn normalize_fn_ref_value(&mut self, v: Node<'t>, from: u32, depth: u32) {
1422 stack_guard!();

Callers 3

visit_nodeMethod · 0.45
scan_fn_ref_subtreeMethod · 0.45

Calls 2

top_rowMethod · 0.45

Tested by

no test coverage detected