(&mut self, from_row: u32, name: &str, kind: &str, node: Node)
| 323 | } |
| 324 | |
| 325 | fn push_ref_at(&mut self, from_row: u32, name: &str, kind: &str, node: Node) { |
| 326 | let name_ref = self.arena.put(name); |
| 327 | self.tables.push_ref(&RefRow { |
| 328 | from_idx: from_row, |
| 329 | kind: edge_kind_index(kind).unwrap(), |
| 330 | line: self.line_of(node), |
| 331 | column: self.col_of(node), |
| 332 | reference_name: name_ref, |
| 333 | candidates: NONE_STR, |
| 334 | from_id_str: NONE_STR, |
| 335 | }); |
| 336 | // Dart import names are URIs (`package:x/y.dart`) — they match neither |
| 337 | // SIMPLE_NAME nor QUALIFIED_IMPORT, so importedNames stays empty in |
| 338 | // practice; ported for fidelity. |
| 339 | if kind == "imports" { |
| 340 | if util::simple_name().is_match(name) { |
| 341 | self.imported_names.insert(name.to_string()); |
| 342 | } else if let Some(c) = util::qualified_import().captures(name) { |
| 343 | self.imported_names.insert(c[1].to_string()); |
| 344 | } |
| 345 | } |
| 346 | } |
| 347 | |
| 348 | // --- createNode (tree-sitter.ts:1308) --------------------------------- |
| 349 |
no test coverage detected