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

Method maybe_capture_fn_refs

codegraph-kernel/src/tsjs/mod.rs:565–574  ·  view source on GitHub ↗
(&mut self, node: Node<'t>)

Source from the content-addressed store, hash-verified

563 // --- function-as-value refs (#756) -----------------------------------------
564
565 fn maybe_capture_fn_refs(&mut self, node: Node<'t>) {
566 let Some(mode) = fnref::dispatch(node.kind()) else { return };
567 if self.stack.is_empty() {
568 return;
569 }
570 let from = self.top_row();
571 for (cand, _mode) in fnref::capture(node, mode, self.src) {
572 self.fn_ref_cands.push((from, cand));
573 }
574 }
575
576 /// scanFnRefSubtree: capture-only walk of subtrees the main walkers skip.
577 fn scan_fn_ref_subtree(&mut self, node: Node<'t>, depth: u32) {

Callers 3

scan_fn_ref_subtreeMethod · 0.45
visit_nodeMethod · 0.45

Calls 4

dispatchFunction · 0.85
captureFunction · 0.85
pushMethod · 0.80
top_rowMethod · 0.45

Tested by

no test coverage detected