(&self, node: Node)
| 276 | } |
| 277 | |
| 278 | fn extract_name(&self, node: Node) -> String { |
| 279 | if let Some(name_node) = node.child_by_field_name("name") { |
| 280 | return self.text(name_node).to_string(); |
| 281 | } |
| 282 | for i in 0..node.named_child_count() { |
| 283 | if let Some(c) = node.named_child(i) { |
| 284 | if matches!(c.kind(), "identifier" | "type_identifier" | "simple_identifier" | "constant") { |
| 285 | return self.text(c).to_string(); |
| 286 | } |
| 287 | } |
| 288 | } |
| 289 | "<anonymous>".to_string() |
| 290 | } |
| 291 | |
| 292 | /// pythonExtractor.getSignature: params + ` -> returnType`. |
| 293 | fn signature_of(&self, node: Node) -> Option<String> { |
no test coverage detected