(&self, node: Node)
| 469 | } |
| 470 | |
| 471 | fn extract_name(&self, node: Node) -> String { |
| 472 | if let Some(name_node) = node.child_by_field_name("name") { |
| 473 | return self.text(name_node).to_string(); |
| 474 | } |
| 475 | for i in 0..node.named_child_count() { |
| 476 | if let Some(c) = node.named_child(i) { |
| 477 | if matches!(c.kind(), "identifier" | "type_identifier" | "simple_identifier" | "constant") { |
| 478 | return self.text(c).to_string(); |
| 479 | } |
| 480 | } |
| 481 | } |
| 482 | "<anonymous>".to_string() |
| 483 | } |
| 484 | |
| 485 | // --- the dispatcher (visitNode, Java-relevant branches) ----------------------- |
| 486 |
no test coverage detected