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

Method flush_fn_ref_candidates

codegraph-kernel/src/scala.rs:1342–1371  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

1340 }
1341
1342 fn flush_fn_ref_candidates(&mut self) {
1343 let cands = std::mem::take(&mut self.fn_ref_cands);
1344 if cands.is_empty() || util::is_generated_file(self.file_path) {
1345 return;
1346 }
1347 let mut seen: HashSet<(String, String)> = HashSet::new();
1348 for c in cands {
1349 if !c.name.starts_with("this.")
1350 && !c.name.contains("::")
1351 && !self.defined_fn_names.contains(&c.name)
1352 && !self.imported_names.contains(&c.name)
1353 {
1354 continue;
1355 }
1356 if !seen.insert((self.node_ids[c.from as usize].clone(), c.name.clone())) {
1357 continue;
1358 }
1359 let column = util::col16(self.src, &self.line_starts, c.row, c.column_byte);
1360 let name_ref = self.arena.put(&c.name);
1361 self.tables.push_ref(&RefRow {
1362 from_idx: c.from,
1363 kind: FUNCTION_REF_CODE,
1364 line: c.line,
1365 column,
1366 reference_name: name_ref,
1367 candidates: NONE_STR,
1368 from_id_str: NONE_STR,
1369 });
1370 }
1371 }
1372
1373 // --- value-reference edges (:398-931) ---------------------------------
1374

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