(&mut self)
| 1404 | } |
| 1405 | |
| 1406 | fn flush_fn_ref_candidates(&mut self) { |
| 1407 | let cands = std::mem::take(&mut self.fn_ref_cands); |
| 1408 | if cands.is_empty() || util::is_generated_file(self.file_path) { |
| 1409 | return; |
| 1410 | } |
| 1411 | let mut seen: HashSet<(String, String)> = HashSet::new(); |
| 1412 | for c in cands { |
| 1413 | if !c.name.starts_with("this.") |
| 1414 | && !c.name.contains("::") |
| 1415 | && !self.defined_fn_names.contains(&c.name) |
| 1416 | && !self.imported_names.contains(&c.name) |
| 1417 | { |
| 1418 | continue; |
| 1419 | } |
| 1420 | if !seen.insert((self.node_ids[c.from as usize].clone(), c.name.clone())) { |
| 1421 | continue; |
| 1422 | } |
| 1423 | let column = util::col16(self.src, &self.line_starts, c.row, c.column_byte); |
| 1424 | let name_ref = self.arena.put(&c.name); |
| 1425 | self.tables.push_ref(&RefRow { |
| 1426 | from_idx: c.from, |
| 1427 | kind: FUNCTION_REF_CODE, |
| 1428 | line: c.line, |
| 1429 | column, |
| 1430 | reference_name: name_ref, |
| 1431 | candidates: NONE_STR, |
| 1432 | from_id_str: NONE_STR, |
| 1433 | }); |
| 1434 | } |
| 1435 | } |
| 1436 | |
| 1437 | // --- value references ------------------------------------------------------------- |
| 1438 |
no test coverage detected