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

Method maybe_capture_fn_refs

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

Source from the content-addressed store, hash-verified

624 // --- function-as-value refs (#756) -----------------------------------------
625
626 fn maybe_capture_fn_refs(&mut self, node: Node<'t>) {
627 let Some(mode) = fnref::dispatch(node.kind()) else { return };
628 if self.stack.is_empty() {
629 return;
630 }
631 let from = self.top_row();
632 for (cand, _mode) in fnref::capture(node, mode, self.src) {
633 self.fn_ref_cands.push((from, cand));
634 }
635 }
636
637 /// scanFnRefSubtree: capture-only walk of subtrees the main walkers skip.
638 /// `walked`: subtrees a body walk has already been through.

Callers 4

scan_fn_ref_subtreeMethod · 0.45
visit_nodeMethod · 0.45

Calls 4

pushMethod · 0.80
dispatchFunction · 0.70
captureFunction · 0.70
top_rowMethod · 0.45

Tested by

no test coverage detected