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

Method flush_fn_ref_candidates

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

Source from the content-addressed store, hash-verified

1478 }
1479
1480 fn flush_fn_ref_candidates(&mut self) {
1481 let cands = std::mem::take(&mut self.fn_ref_cands);
1482 if cands.is_empty() || util::is_generated_file(self.file_path) {
1483 return;
1484 }
1485 let mut seen: HashSet<(String, String)> = HashSet::new();
1486 for c in cands {
1487 if !c.name.starts_with("this.")
1488 && !c.name.contains("::")
1489 && !self.defined_fn_names.contains(&c.name)
1490 && !self.imported_names.contains(&c.name)
1491 {
1492 continue;
1493 }
1494 if !seen.insert((self.node_ids[c.from as usize].clone(), c.name.clone())) {
1495 continue;
1496 }
1497 let column = util::col16(self.src, &self.line_starts, c.row, c.column_byte);
1498 let name_ref = self.arena.put(&c.name);
1499 self.tables.push_ref(&RefRow {
1500 from_idx: c.from,
1501 kind: FUNCTION_REF_CODE,
1502 line: c.line,
1503 column,
1504 reference_name: name_ref,
1505 candidates: NONE_STR,
1506 from_id_str: NONE_STR,
1507 });
1508 }
1509 }
1510
1511 // --- value refs -------------------------------------------------------------
1512

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