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

Method flush_fn_ref_candidates

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

Source from the content-addressed store, hash-verified

1498 }
1499
1500 fn flush_fn_ref_candidates(&mut self) {
1501 let cands = std::mem::take(&mut self.fn_ref_cands);
1502 if cands.is_empty() || util::is_generated_file(self.file_path) {
1503 return;
1504 }
1505 let mut seen: HashSet<(String, String)> = HashSet::new();
1506 for c in cands {
1507 if !c.name.starts_with("this.")
1508 && !c.name.contains("::")
1509 && !self.defined_fn_names.contains(&c.name)
1510 && !self.imported_names.contains(&c.name)
1511 {
1512 continue;
1513 }
1514 if !seen.insert((self.node_ids[c.from as usize].clone(), c.name.clone())) {
1515 continue;
1516 }
1517 let column = util::col16(self.src, &self.line_starts, c.row, c.column_byte);
1518 let name_ref = self.arena.put(&c.name);
1519 self.tables.push_ref(&RefRow {
1520 from_idx: c.from,
1521 kind: FUNCTION_REF_CODE,
1522 line: c.line,
1523 column,
1524 reference_name: name_ref,
1525 candidates: NONE_STR,
1526 from_id_str: NONE_STR,
1527 });
1528 }
1529 }
1530
1531 // --- value refs -------------------------------------------------------------
1532

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