(&self, node: Node)
| 476 | } |
| 477 | |
| 478 | fn extract_name(&self, node: Node) -> String { |
| 479 | if let Some(name_node) = node.child_by_field_name("name") { |
| 480 | return self.text(name_node).to_string(); |
| 481 | } |
| 482 | for c in node.named_children(&mut node.walk()) { |
| 483 | if matches!(c.kind(), "identifier" | "type_identifier" | "simple_identifier" | "constant") { |
| 484 | return self.text(c).to_string(); |
| 485 | } |
| 486 | } |
| 487 | "<anonymous>".to_string() |
| 488 | } |
| 489 | |
| 490 | // --- the dispatcher (visitNode, Java-relevant branches) ----------------------- |
| 491 |
no test coverage detected