Module line_index

Module line_index 

Source
Expand description

Byte-offset → line/column conversion for rowan CST nodes.

Rowan provides byte-offset ranges via text_range(). This module builds an index of newline positions so that offsets can be efficiently mapped to the 1-based (line, column) pairs used by the existing AST types.

Structs§

LineIndex
Pre-computed index of line-start byte offsets for a source string.