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

Method flush_fn_ref_candidates

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

Source from the content-addressed store, hash-verified

1386 }
1387
1388 fn flush_fn_ref_candidates(&mut self) {
1389 let cands = std::mem::take(&mut self.fn_ref_cands);
1390 if cands.is_empty() || util::is_generated_file(self.file_path) {
1391 return;
1392 }
1393 let mut seen: HashSet<(String, String)> = HashSet::new();
1394 for c in cands {
1395 if !c.name.starts_with("this.")
1396 && !c.name.contains("::")
1397 && !self.defined_fn_names.contains(&c.name)
1398 && !self.imported_names.contains(&c.name)
1399 {
1400 continue;
1401 }
1402 if !seen.insert((self.node_ids[c.from as usize].clone(), c.name.clone())) {
1403 continue;
1404 }
1405 let column = util::col16(self.src, &self.line_starts, c.row, c.column_byte);
1406 let name_ref = self.arena.put(&c.name);
1407 self.tables.push_ref(&RefRow {
1408 from_idx: c.from,
1409 kind: FUNCTION_REF_CODE,
1410 line: c.line,
1411 column,
1412 reference_name: name_ref,
1413 candidates: NONE_STR,
1414 from_id_str: NONE_STR,
1415 });
1416 }
1417 }
1418
1419 // --- value references --------------------------------------------------------------
1420

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