(&mut self)
| 1031 | } |
| 1032 | |
| 1033 | fn flush_fn_ref_candidates(&mut self) { |
| 1034 | let cands = std::mem::take(&mut self.fn_ref_cands); |
| 1035 | if cands.is_empty() || util::is_generated_file(self.file_path) { |
| 1036 | return; |
| 1037 | } |
| 1038 | let mut seen: HashSet<(String, String)> = HashSet::new(); |
| 1039 | for c in cands { |
| 1040 | if !c.name.starts_with("this.") |
| 1041 | && !c.name.contains("::") |
| 1042 | && !self.defined_fn_names.contains(&c.name) |
| 1043 | && !self.imported_names.contains(&c.name) |
| 1044 | { |
| 1045 | continue; |
| 1046 | } |
| 1047 | if !seen.insert((self.node_ids[c.from as usize].clone(), c.name.clone())) { |
| 1048 | continue; |
| 1049 | } |
| 1050 | let column = util::col16(self.src, &self.line_starts, c.row, c.column_byte); |
| 1051 | let name_ref = self.arena.put(&c.name); |
| 1052 | self.tables.push_ref(&RefRow { |
| 1053 | from_idx: c.from, |
| 1054 | kind: FUNCTION_REF_CODE, |
| 1055 | line: c.line, |
| 1056 | column, |
| 1057 | reference_name: name_ref, |
| 1058 | candidates: NONE_STR, |
| 1059 | from_id_str: NONE_STR, |
| 1060 | }); |
| 1061 | } |
| 1062 | } |
| 1063 | |
| 1064 | // --- value refs ------------------------------------------------------------------- |
| 1065 |
no test coverage detected