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