Skip to main content

Module range_ext

Module range_ext 

Source
Expand description

Extension trait sugar for TextRange.

cyrs uses byte offsets for every span (spec §4); line/column conversion is owned by LineIndex and only happens at LSP and diagnostic-render boundaries. The helpers in this module deduplicate the handful of one-line conversions that consumer crates were rolling themselves (TextRangeRange<usize>, TextRangeRange<u32>, and the half-open intersection predicate).

Traits§

TextRangeExt
Convenience conversions on top of TextRange.