(&mut self, from_row: u32, name: &str, kind: &str, node: Node)
| 368 | } |
| 369 | |
| 370 | fn push_ref_at(&mut self, from_row: u32, name: &str, kind: &str, node: Node) { |
| 371 | let name_ref = self.arena.put(name); |
| 372 | self.tables.push_ref(&RefRow { |
| 373 | from_idx: from_row, |
| 374 | kind: edge_kind_index(kind).unwrap(), |
| 375 | line: self.line_of(node), |
| 376 | column: self.col_of(node), |
| 377 | reference_name: name_ref, |
| 378 | candidates: NONE_STR, |
| 379 | from_id_str: NONE_STR, |
| 380 | }); |
| 381 | // Dart import names are URIs (`package:x/y.dart`) — they match neither |
| 382 | // SIMPLE_NAME nor QUALIFIED_IMPORT, so importedNames stays empty in |
| 383 | // practice; ported for fidelity. |
| 384 | if kind == "imports" { |
| 385 | if util::simple_name().is_match(name) { |
| 386 | self.imported_names.insert(name.to_string()); |
| 387 | } else if let Some(c) = util::qualified_import().captures(name) { |
| 388 | self.imported_names.insert(c[1].to_string()); |
| 389 | } |
| 390 | } |
| 391 | } |
| 392 | |
| 393 | // --- createNode (tree-sitter.ts:1308) --------------------------------- |
| 394 |
no test coverage detected