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

Method flush_fn_ref_candidates

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

Source from the content-addressed store, hash-verified

1769 }
1770
1771 fn flush_fn_ref_candidates(&mut self) {
1772 let cands = std::mem::take(&mut self.fn_ref_cands);
1773 if cands.is_empty() || util::is_generated_file(self.file_path) {
1774 return;
1775 }
1776 let mut seen: HashSet<(String, String)> = HashSet::new();
1777 for c in cands {
1778 if !c.name.starts_with("this.")
1779 && !c.name.contains("::")
1780 && !self.defined_fn_names.contains(&c.name)
1781 && !self.imported_names.contains(&c.name)
1782 {
1783 continue;
1784 }
1785 if !seen.insert((self.node_ids[c.from as usize].clone(), c.name.clone())) {
1786 continue;
1787 }
1788 let column = util::col16(self.src, &self.line_starts, c.row, c.column_byte);
1789 let name_ref = self.arena.put(&c.name);
1790 self.tables.push_ref(&RefRow {
1791 from_idx: c.from,
1792 kind: FUNCTION_REF_CODE,
1793 line: c.line,
1794 column,
1795 reference_name: name_ref,
1796 candidates: NONE_STR,
1797 from_id_str: NONE_STR,
1798 });
1799 }
1800 }
1801
1802 // --- value references --------------------------------------------------------------
1803

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