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

Method flush_fn_ref_candidates

codegraph-kernel/src/dart.rs:2041–2070  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

2039 }
2040
2041 fn flush_fn_ref_candidates(&mut self) {
2042 let cands = std::mem::take(&mut self.fn_ref_cands);
2043 if cands.is_empty() || util::is_generated_file(self.file_path) {
2044 return;
2045 }
2046 let mut seen: HashSet<(String, String)> = HashSet::new();
2047 for c in cands {
2048 if !c.name.starts_with("this.")
2049 && !c.name.contains("::")
2050 && !self.defined_fn_names.contains(&c.name)
2051 && !self.imported_names.contains(&c.name)
2052 {
2053 continue;
2054 }
2055 if !seen.insert((self.node_ids[c.from as usize].clone(), c.name.clone())) {
2056 continue;
2057 }
2058 let column = util::col16(self.src, &self.line_starts, c.row, c.column_byte);
2059 let name_ref = self.arena.put(&c.name);
2060 self.tables.push_ref(&RefRow {
2061 from_idx: c.from,
2062 kind: FUNCTION_REF_CODE,
2063 line: c.line,
2064 column,
2065 reference_name: name_ref,
2066 candidates: NONE_STR,
2067 from_id_str: NONE_STR,
2068 });
2069 }
2070 }
2071
2072 // --- value-reference edges (:398-931) ---------------------------------
2073

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