(&self, node: Node)
| 315 | } |
| 316 | |
| 317 | fn extract_name(&self, node: Node) -> String { |
| 318 | if let Some(name_node) = node.child_by_field_name("name") { |
| 319 | return self.text(name_node).to_string(); |
| 320 | } |
| 321 | for c in node.named_children(&mut node.walk()) { |
| 322 | if matches!(c.kind(), "identifier" | "type_identifier" | "simple_identifier" | "constant") { |
| 323 | return self.text(c).to_string(); |
| 324 | } |
| 325 | } |
| 326 | "<anonymous>".to_string() |
| 327 | } |
| 328 | |
| 329 | /// goExtractor.getSignature: params + ' ' + result. |
| 330 | fn signature_of(&self, node: Node) -> Option<String> { |
no test coverage detected