(node: Node, source: &str)
| 319 | |
| 320 | #[cfg(feature = "tree-sitter-ast")] |
| 321 | fn signature_text(node: Node, source: &str) -> String { |
| 322 | if let Some(body) = node.child_by_field_name("body") { |
| 323 | let start = node.start_byte(); |
| 324 | let end = body.start_byte(); |
| 325 | return source[start..end].trim().to_string(); |
| 326 | } |
| 327 | node_text(node, source) |
| 328 | } |
| 329 | |
| 330 | #[cfg(feature = "tree-sitter-ast")] |
| 331 | fn visibility_text(language: TsLanguageKind, node: Node, source: &str) -> String { |
no test coverage detected