extractName (tree-sitter.ts:90) — the C#-reachable paths: the `name` field (always present on named declarations), else the shared identifier scan, else ` `.
(&self, node: Node)
| 484 | /// field (always present on named declarations), else the shared |
| 485 | /// identifier scan, else `<anonymous>`. |
| 486 | fn extract_name(&self, node: Node) -> String { |
| 487 | if let Some(name_node) = node.child_by_field_name("name") { |
| 488 | return self.text(name_node).to_string(); |
| 489 | } |
| 490 | for i in 0..node.named_child_count() { |
| 491 | if let Some(c) = node.named_child(i) { |
| 492 | if matches!(c.kind(), "identifier" | "type_identifier" | "simple_identifier" | "constant") { |
| 493 | return self.text(c).to_string(); |
| 494 | } |
| 495 | } |
| 496 | } |
| 497 | "<anonymous>".to_string() |
| 498 | } |
| 499 | |
| 500 | // --- the dispatcher (visitNode, C#-relevant branches) ----------------------- |
| 501 |
no test coverage detected