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