(&mut self)
| 1386 | } |
| 1387 | |
| 1388 | fn flush_fn_ref_candidates(&mut self) { |
| 1389 | let cands = std::mem::take(&mut self.fn_ref_cands); |
| 1390 | if cands.is_empty() || util::is_generated_file(self.file_path) { |
| 1391 | return; |
| 1392 | } |
| 1393 | let mut seen: HashSet<(String, String)> = HashSet::new(); |
| 1394 | for c in cands { |
| 1395 | if !c.name.starts_with("this.") |
| 1396 | && !c.name.contains("::") |
| 1397 | && !self.defined_fn_names.contains(&c.name) |
| 1398 | && !self.imported_names.contains(&c.name) |
| 1399 | { |
| 1400 | continue; |
| 1401 | } |
| 1402 | if !seen.insert((self.node_ids[c.from as usize].clone(), c.name.clone())) { |
| 1403 | continue; |
| 1404 | } |
| 1405 | let column = util::col16(self.src, &self.line_starts, c.row, c.column_byte); |
| 1406 | let name_ref = self.arena.put(&c.name); |
| 1407 | self.tables.push_ref(&RefRow { |
| 1408 | from_idx: c.from, |
| 1409 | kind: FUNCTION_REF_CODE, |
| 1410 | line: c.line, |
| 1411 | column, |
| 1412 | reference_name: name_ref, |
| 1413 | candidates: NONE_STR, |
| 1414 | from_id_str: NONE_STR, |
| 1415 | }); |
| 1416 | } |
| 1417 | } |
| 1418 | |
| 1419 | // --- value references -------------------------------------------------------------- |
| 1420 |
no test coverage detected