Skip to main content

to_parser_span

Function to_parser_span 

Source
pub fn to_parser_span(span: GrammarSpan<'_>) -> Span
Expand description

Convert grammar span (LocatedSpan) to parser span (line/column)

This handles multi-line fragments by computing end line/column based on newline count and last-line length. Columns are byte-based 1-based offsets to match Position semantics.