(&mut self)
| 805 | } |
| 806 | |
| 807 | fn flush_fn_ref_candidates(&mut self) { |
| 808 | let cands = std::mem::take(&mut self.fn_ref_cands); |
| 809 | if cands.is_empty() || util::is_generated_file(self.file_path) { |
| 810 | return; |
| 811 | } |
| 812 | let mut seen: HashSet<(String, String)> = HashSet::new(); |
| 813 | for c in cands { |
| 814 | if !c.name.starts_with("this.") |
| 815 | && !c.name.contains("::") |
| 816 | && !self.defined_fn_names.contains(&c.name) |
| 817 | && !self.imported_names.contains(&c.name) |
| 818 | { |
| 819 | continue; |
| 820 | } |
| 821 | if !seen.insert((self.node_ids[c.from as usize].clone(), c.name.clone())) { |
| 822 | continue; |
| 823 | } |
| 824 | let column = util::col16(self.src, &self.line_starts, c.row, c.column_byte); |
| 825 | let name_ref = self.arena.put(&c.name); |
| 826 | self.tables.push_ref(&RefRow { |
| 827 | from_idx: c.from, |
| 828 | kind: FUNCTION_REF_CODE, |
| 829 | line: c.line, |
| 830 | column, |
| 831 | reference_name: name_ref, |
| 832 | candidates: NONE_STR, |
| 833 | from_id_str: NONE_STR, |
| 834 | }); |
| 835 | } |
| 836 | } |
| 837 | |
| 838 | // --- value refs ------------------------------------------------------------------- |
| 839 |
no test coverage detected