(&self, node: Node)
| 339 | } |
| 340 | |
| 341 | fn extract_name(&self, node: Node) -> String { |
| 342 | if let Some(name_node) = node.child_by_field_name("name") { |
| 343 | return self.text(name_node).to_string(); |
| 344 | } |
| 345 | for i in 0..node.named_child_count() { |
| 346 | if let Some(c) = node.named_child(i) { |
| 347 | if matches!(c.kind(), "identifier" | "type_identifier" | "simple_identifier" | "constant") { |
| 348 | return self.text(c).to_string(); |
| 349 | } |
| 350 | } |
| 351 | } |
| 352 | "<anonymous>".to_string() |
| 353 | } |
| 354 | |
| 355 | /// rubyExtractor.getVisibility — walk the previousNamedSibling chain |
| 356 | /// (unbounded, through non-matching siblings); the first `call` sibling |
no test coverage detected