Get the text content of a node.
(&self, node: &Node, source: &str)
| 591 | |
| 592 | /// Get the text content of a node. |
| 593 | fn node_text(&self, node: &Node, source: &str) -> String { |
| 594 | let start = node.start_byte(); |
| 595 | let end = node.end_byte(); |
| 596 | if end <= source.len() { |
| 597 | source[start..end].to_string() |
| 598 | } else { |
| 599 | String::new() |
| 600 | } |
| 601 | } |
| 602 | |
| 603 | fn walk_tree_for_calls( |
| 604 | &self, |
no test coverage detected