(&mut self)
| 1277 | } |
| 1278 | |
| 1279 | fn flush_fn_ref_candidates(&mut self) { |
| 1280 | let cands = std::mem::take(&mut self.fn_ref_cands); |
| 1281 | if cands.is_empty() || util::is_generated_file(self.file_path) { |
| 1282 | return; |
| 1283 | } |
| 1284 | let mut seen: HashSet<(String, String)> = HashSet::new(); |
| 1285 | for c in cands { |
| 1286 | if !c.name.starts_with("this.") |
| 1287 | && !c.name.contains("::") |
| 1288 | && !self.defined_fn_names.contains(&c.name) |
| 1289 | && !self.imported_names.contains(&c.name) |
| 1290 | { |
| 1291 | continue; |
| 1292 | } |
| 1293 | if !seen.insert((self.node_ids[c.from as usize].clone(), c.name.clone())) { |
| 1294 | continue; |
| 1295 | } |
| 1296 | let column = util::col16(self.src, &self.line_starts, c.row, c.column_byte); |
| 1297 | let name_ref = self.arena.put(&c.name); |
| 1298 | self.tables.push_ref(&RefRow { |
| 1299 | from_idx: c.from, |
| 1300 | kind: FUNCTION_REF_CODE, |
| 1301 | line: c.line, |
| 1302 | column, |
| 1303 | reference_name: name_ref, |
| 1304 | candidates: NONE_STR, |
| 1305 | from_id_str: NONE_STR, |
| 1306 | }); |
| 1307 | } |
| 1308 | } |
| 1309 | |
| 1310 | // --- value refs ------------------------------------------------------------- |
| 1311 |
no test coverage detected