Get the first line of a node's text (for signatures).
(&self, node: &Node, source: &str)
| 498 | |
| 499 | /// Get the first line of a node's text (for signatures). |
| 500 | fn first_line(&self, node: &Node, source: &str) -> Option<String> { |
| 501 | let text = self.node_text(node, source); |
| 502 | let first = text.lines().next()?; |
| 503 | Some(first.trim_end_matches('{').trim().to_string()) |
| 504 | } |
| 505 | |
| 506 | /// Walk the AST collecting function call sites. |
| 507 | /// |
no test coverage detected