(&mut self)
| 1209 | } |
| 1210 | |
| 1211 | fn flush_fn_ref_candidates(&mut self) { |
| 1212 | let cands = std::mem::take(&mut self.fn_ref_cands); |
| 1213 | if cands.is_empty() || util::is_generated_file(self.file_path) { |
| 1214 | return; |
| 1215 | } |
| 1216 | let mut seen: HashSet<(String, String)> = HashSet::new(); |
| 1217 | for c in cands { |
| 1218 | if !c.name.starts_with("this.") |
| 1219 | && !c.name.contains("::") |
| 1220 | && !self.defined_fn_names.contains(&c.name) |
| 1221 | && !self.imported_names.contains(&c.name) |
| 1222 | { |
| 1223 | continue; |
| 1224 | } |
| 1225 | // Dedupe on the node ID string (ids collide; the TS side keys on |
| 1226 | // `${fromNodeId}|${name}`). |
| 1227 | if !seen.insert((self.node_ids[c.from as usize].clone(), c.name.clone())) { |
| 1228 | continue; |
| 1229 | } |
| 1230 | let column = util::col16(self.src, &self.line_starts, c.row, c.column_byte); |
| 1231 | let name_ref = self.arena.put(&c.name); |
| 1232 | self.tables.push_ref(&RefRow { |
| 1233 | from_idx: c.from, |
| 1234 | kind: FUNCTION_REF_CODE, |
| 1235 | line: c.line, |
| 1236 | column, |
| 1237 | reference_name: name_ref, |
| 1238 | candidates: NONE_STR, |
| 1239 | from_id_str: NONE_STR, |
| 1240 | }); |
| 1241 | } |
| 1242 | } |
| 1243 | |
| 1244 | // --- value references ------------------------------------------------------------ |
| 1245 |
no test coverage detected