Gets the text of a tree-sitter node from the source.
(source: &[u8], node: TsNode<'_>)
| 12 | |
| 13 | /// Gets the text of a tree-sitter node from the source. |
| 14 | fn node_text(source: &[u8], node: TsNode<'_>) -> String { |
| 15 | node.utf8_text(source) |
| 16 | .unwrap_or("<invalid utf8>") |
| 17 | .to_string() |
| 18 | } |
| 19 | |
| 20 | /// Strip comment markers from a single C-style comment text |
| 21 | /// (`//` line comments and `/* ... */` block comments). |
no outgoing calls
no test coverage detected