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

Method flush_fn_ref_candidates

codegraph-kernel/src/csharp.rs:1562–1597  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

1560 }
1561
1562 fn flush_fn_ref_candidates(&mut self) {
1563 let cands = std::mem::take(&mut self.fn_ref_cands);
1564 if cands.is_empty() || util::is_generated_file(self.file_path) {
1565 return;
1566 }
1567 let mut seen: HashSet<(String, String)> = HashSet::new();
1568 for c in cands {
1569 // C# candidates are bare names (its this-forms normalize to the
1570 // bare member), so the `this.`/`::` bypasses are inert — kept for
1571 // shared-shape parity — or a method group through a receiver
1572 // (`worker.Run`), the only dotted one, which skips the gate as its
1573 // TS twin's `skipGate` does. Gate: definedHere ∪ importedNames.
1574 if !c.name.starts_with("this.")
1575 && !c.name.contains("::")
1576 && !c.name.contains('.')
1577 && !self.defined_fn_names.contains(&c.name)
1578 && !self.imported_names.contains(&c.name)
1579 {
1580 continue;
1581 }
1582 if !seen.insert((self.node_ids[c.from as usize].clone(), c.name.clone())) {
1583 continue;
1584 }
1585 let column = util::col16(self.src, &self.line_starts, c.row, c.column_byte);
1586 let name_ref = self.arena.put(&c.name);
1587 self.tables.push_ref(&RefRow {
1588 from_idx: c.from,
1589 kind: FUNCTION_REF_CODE,
1590 line: c.line,
1591 column,
1592 reference_name: name_ref,
1593 candidates: NONE_STR,
1594 from_id_str: NONE_STR,
1595 });
1596 }
1597 }
1598
1599 // --- value references --------------------------------------------------------
1600

Callers 1

extractFunction · 0.45

Calls 5

is_generated_fileFunction · 0.85
col16Function · 0.85
putMethod · 0.65
takeFunction · 0.50
push_refMethod · 0.45

Tested by

no test coverage detected