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

Method maybe_capture_fn_refs

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

Source from the content-addressed store, hash-verified

1234 // --- function-as-value refs (PHP_SPEC, function-ref.ts:360) --------------------
1235
1236 fn maybe_capture_fn_refs(&mut self, node: Node<'t>) {
1237 if node.kind() != "arguments" {
1238 return;
1239 }
1240 if self.stack.is_empty() {
1241 return;
1242 }
1243 let from = self.top_row();
1244 for i in 0..node.named_child_count() {
1245 if let Some(c) = node.named_child(i) {
1246 self.normalize_fn_ref_value(c, from, 0);
1247 }
1248 }
1249 }
1250
1251 fn normalize_fn_ref_value(&mut self, v: Node<'t>, from: u32, depth: u32) {
1252 if depth > 4 {

Callers 3

visit_nodeMethod · 0.45
scan_fn_ref_subtreeMethod · 0.45

Calls 2

top_rowMethod · 0.45

Tested by

no test coverage detected