Skip to main content

text_range_for_node

Function text_range_for_node 

Source
pub fn text_range_for_node(node: Node<'_>) -> TextRange
Expand description

Converts a Tree-sitter node range into a source text range.

let range = achitek_source::text_range_for_node(node);

assert!(range.start <= range.end);