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

Method flush_fn_ref_candidates

codegraph-kernel/src/dart.rs:2459–2488  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

2457 }
2458
2459 fn flush_fn_ref_candidates(&mut self) {
2460 let cands = std::mem::take(&mut self.fn_ref_cands);
2461 if cands.is_empty() || util::is_generated_file(self.file_path) {
2462 return;
2463 }
2464 let mut seen: HashSet<(String, String)> = HashSet::new();
2465 for c in cands {
2466 if !c.name.starts_with("this.")
2467 && !c.name.contains("::")
2468 && !self.defined_fn_names.contains(&c.name)
2469 && !self.imported_names.contains(&c.name)
2470 {
2471 continue;
2472 }
2473 if !seen.insert((self.node_ids[c.from as usize].clone(), c.name.clone())) {
2474 continue;
2475 }
2476 let column = util::col16(self.src, &self.line_starts, c.row, c.column_byte);
2477 let name_ref = self.arena.put(&c.name);
2478 self.tables.push_ref(&RefRow {
2479 from_idx: c.from,
2480 kind: FUNCTION_REF_CODE,
2481 line: c.line,
2482 column,
2483 reference_name: name_ref,
2484 candidates: NONE_STR,
2485 from_id_str: NONE_STR,
2486 });
2487 }
2488 }
2489
2490 // --- value-reference edges (:398-931) ---------------------------------
2491

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