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

Method flush_fn_ref_candidates

codegraph-kernel/src/kotlin.rs:1751–1780  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

1749 }
1750
1751 fn flush_fn_ref_candidates(&mut self) {
1752 let cands = std::mem::take(&mut self.fn_ref_cands);
1753 if cands.is_empty() || util::is_generated_file(self.file_path) {
1754 return;
1755 }
1756 let mut seen: HashSet<(String, String)> = HashSet::new();
1757 for c in cands {
1758 if !c.name.starts_with("this.")
1759 && !c.name.contains("::")
1760 && !self.defined_fn_names.contains(&c.name)
1761 && !self.imported_names.contains(&c.name)
1762 {
1763 continue;
1764 }
1765 if !seen.insert((self.node_ids[c.from as usize].clone(), c.name.clone())) {
1766 continue;
1767 }
1768 let column = util::col16(self.src, &self.line_starts, c.row, c.column_byte);
1769 let name_ref = self.arena.put(&c.name);
1770 self.tables.push_ref(&RefRow {
1771 from_idx: c.from,
1772 kind: FUNCTION_REF_CODE,
1773 line: c.line,
1774 column,
1775 reference_name: name_ref,
1776 candidates: NONE_STR,
1777 from_id_str: NONE_STR,
1778 });
1779 }
1780 }
1781
1782 // --- value references --------------------------------------------------------------
1783

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