(&mut self)
| 1419 | } |
| 1420 | |
| 1421 | fn flush_fn_ref_candidates(&mut self) { |
| 1422 | let cands = std::mem::take(&mut self.fn_ref_cands); |
| 1423 | if cands.is_empty() || util::is_generated_file(self.file_path) { |
| 1424 | return; |
| 1425 | } |
| 1426 | let mut seen: HashSet<(String, String)> = HashSet::new(); |
| 1427 | for c in cands { |
| 1428 | if !c.name.starts_with("this.") |
| 1429 | && !c.name.contains("::") |
| 1430 | && !self.defined_fn_names.contains(&c.name) |
| 1431 | && !self.imported_names.contains(&c.name) |
| 1432 | { |
| 1433 | continue; |
| 1434 | } |
| 1435 | if !seen.insert((self.node_ids[c.from as usize].clone(), c.name.clone())) { |
| 1436 | continue; |
| 1437 | } |
| 1438 | let column = util::col16(self.src, &self.line_starts, c.row, c.column_byte); |
| 1439 | let name_ref = self.arena.put(&c.name); |
| 1440 | self.tables.push_ref(&RefRow { |
| 1441 | from_idx: c.from, |
| 1442 | kind: FUNCTION_REF_CODE, |
| 1443 | line: c.line, |
| 1444 | column, |
| 1445 | reference_name: name_ref, |
| 1446 | candidates: NONE_STR, |
| 1447 | from_id_str: NONE_STR, |
| 1448 | }); |
| 1449 | } |
| 1450 | } |
| 1451 | |
| 1452 | // --- value references ------------------------------------------------------------- |
| 1453 |
no test coverage detected