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