Skip to main content

ruby_semantic_identifier_range

Function ruby_semantic_identifier_range 

Source
pub fn ruby_semantic_identifier_range(node: Node<'_>, source: &str) -> Range
Expand description

Returns the source range of the semantic identifier carried by a Ruby symbol.

Tree-sitter represents an unquoted symbol such as :audit as one leaf simple_symbol node, so its parser range includes the leading colon. Static quoted symbols have a structured string_content child that excludes both the colon and quote delimiters. Other nodes keep their parser range.