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

Method flush_fn_ref_candidates

codegraph-kernel/src/rustlang.rs:1279–1308  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

1277 }
1278
1279 fn flush_fn_ref_candidates(&mut self) {
1280 let cands = std::mem::take(&mut self.fn_ref_cands);
1281 if cands.is_empty() || util::is_generated_file(self.file_path) {
1282 return;
1283 }
1284 let mut seen: HashSet<(String, String)> = HashSet::new();
1285 for c in cands {
1286 if !c.name.starts_with("this.")
1287 && !c.name.contains("::")
1288 && !self.defined_fn_names.contains(&c.name)
1289 && !self.imported_names.contains(&c.name)
1290 {
1291 continue;
1292 }
1293 if !seen.insert((self.node_ids[c.from as usize].clone(), c.name.clone())) {
1294 continue;
1295 }
1296 let column = util::col16(self.src, &self.line_starts, c.row, c.column_byte);
1297 let name_ref = self.arena.put(&c.name);
1298 self.tables.push_ref(&RefRow {
1299 from_idx: c.from,
1300 kind: FUNCTION_REF_CODE,
1301 line: c.line,
1302 column,
1303 reference_name: name_ref,
1304 candidates: NONE_STR,
1305 from_id_str: NONE_STR,
1306 });
1307 }
1308 }
1309
1310 // --- value refs -------------------------------------------------------------
1311

Callers 1

extractFunction · 0.45

Calls 4

is_generated_fileFunction · 0.85
col16Function · 0.85
putMethod · 0.80
push_refMethod · 0.45

Tested by

no test coverage detected