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