(&mut self, from_row: u32, name: &str, kind: &str, node: Node)
| 236 | } |
| 237 | |
| 238 | fn push_ref_at(&mut self, from_row: u32, name: &str, kind: &str, node: Node) { |
| 239 | let name_ref = self.arena.put(name); |
| 240 | self.tables.push_ref(&RefRow { |
| 241 | from_idx: from_row, |
| 242 | kind: edge_kind_index(kind).unwrap(), |
| 243 | line: self.line_of(node), |
| 244 | column: self.col_of(node), |
| 245 | reference_name: name_ref, |
| 246 | candidates: NONE_STR, |
| 247 | from_id_str: NONE_STR, |
| 248 | }); |
| 249 | // Dart import names are URIs (`package:x/y.dart`) — they match neither |
| 250 | // SIMPLE_NAME nor QUALIFIED_IMPORT, so importedNames stays empty in |
| 251 | // practice; ported for fidelity. |
| 252 | if kind == "imports" { |
| 253 | if util::simple_name().is_match(name) { |
| 254 | self.imported_names.insert(name.to_string()); |
| 255 | } else if let Some(c) = util::qualified_import().captures(name) { |
| 256 | self.imported_names.insert(c[1].to_string()); |
| 257 | } |
| 258 | } |
| 259 | } |
| 260 | |
| 261 | // --- createNode (tree-sitter.ts:1308) --------------------------------- |
| 262 |
no test coverage detected