(&self, node: Node)
| 483 | } |
| 484 | |
| 485 | fn extract_name(&self, node: Node) -> String { |
| 486 | if let Some(name_node) = node.child_by_field_name("name") { |
| 487 | return self.text(name_node).to_string(); |
| 488 | } |
| 489 | for i in 0..node.named_child_count() { |
| 490 | if let Some(c) = node.named_child(i) { |
| 491 | if matches!(c.kind(), "identifier" | "type_identifier" | "simple_identifier" | "constant") { |
| 492 | return self.text(c).to_string(); |
| 493 | } |
| 494 | } |
| 495 | } |
| 496 | "<anonymous>".to_string() |
| 497 | } |
| 498 | |
| 499 | // --- the dispatcher (visitNode, Java-relevant branches) ----------------------- |
| 500 |
no test coverage detected