(&self, node: Node)
| 371 | } |
| 372 | |
| 373 | fn extract_name(&self, node: Node) -> String { |
| 374 | if let Some(name_node) = node.child_by_field_name("name") { |
| 375 | return self.text(name_node).to_string(); |
| 376 | } |
| 377 | for i in 0..node.named_child_count() { |
| 378 | if let Some(c) = node.named_child(i) { |
| 379 | if matches!(c.kind(), "identifier" | "type_identifier" | "simple_identifier" | "constant") { |
| 380 | return self.text(c).to_string(); |
| 381 | } |
| 382 | } |
| 383 | } |
| 384 | "<anonymous>".to_string() |
| 385 | } |
| 386 | |
| 387 | /// pythonExtractor.getSignature: params + ` -> returnType`. |
| 388 | fn signature_of(&self, node: Node) -> Option<String> { |
no test coverage detected