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

Method maybe_capture_fn_refs

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

Source from the content-addressed store, hash-verified

1244 // --- function-as-value refs (PHP_SPEC, function-ref.ts:360) --------------------
1245
1246 fn maybe_capture_fn_refs(&mut self, node: Node<'t>) {
1247 if node.kind() != "arguments" {
1248 return;
1249 }
1250 if self.stack.is_empty() {
1251 return;
1252 }
1253 let from = self.top_row();
1254 for i in 0..node.named_child_count() {
1255 if let Some(c) = node.named_child(i) {
1256 self.normalize_fn_ref_value(c, from, 0);
1257 }
1258 }
1259 }
1260
1261 fn normalize_fn_ref_value(&mut self, v: Node<'t>, from: u32, depth: u32) {
1262 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