extractImport via csharpExtractor.extractImport: moduleName = first qualified_name child's text, else first identifier's — with the alias quirks (alias-to-qualified keeps generic args on the TARGET text; alias-to-identifier captures the ALIAS name) preserved verbatim.
(&mut self, node: Node<'t>)
| 1102 | /// quirks (alias-to-qualified keeps generic args on the TARGET text; |
| 1103 | /// alias-to-identifier captures the ALIAS name) preserved verbatim. |
| 1104 | fn extract_import(&mut self, node: Node<'t>) { |
| 1105 | let import_text = self.text(node).trim().to_string(); |
| 1106 | let target = (0..node.named_child_count()) |
| 1107 | .filter_map(|i| node.named_child(i)) |
| 1108 | .find(|c| c.kind() == "qualified_name") |
| 1109 | .or_else(|| { |
| 1110 | (0..node.named_child_count()) |
| 1111 | .filter_map(|i| node.named_child(i)) |
| 1112 | .find(|c| c.kind() == "identifier") |
| 1113 | }); |
| 1114 | let Some(target) = target else { return }; // hook declined → no node, no ref |
| 1115 | let module_name = self.text(target).to_string(); |
| 1116 | if module_name.is_empty() { |
| 1117 | return; |
| 1118 | } |
| 1119 | self.create_node( |
| 1120 | "import", |
| 1121 | &module_name, |
| 1122 | node, |
| 1123 | Extra { signature: Some(import_text), ..Extra::default() }, |
| 1124 | ); |
| 1125 | // One generic `imports` ref from the stack top (the namespace node in |
| 1126 | // a namespaced file, else the file node). No per-binding emitter. |
| 1127 | let parent = self.top_row(); |
| 1128 | self.push_ref_at(parent, &module_name.clone(), edge_kind_index("imports").unwrap(), node); |
| 1129 | } |
| 1130 | |
| 1131 | /// extractCall — the C# branch (tree-sitter.ts:4502) + shared tail. |
| 1132 | fn extract_call(&mut self, node: Node<'t>) { |
no test coverage detected