Skip to main content

Module position

Module position 

Source
Expand description

Parser engine components and supporting utilities. Position tracking types and UTF-16 mapping utilities. Enhanced position tracking for incremental parsing

This module re-exports position types from perl-position-tracking.

Structs§

LineIndex
Stores line information for efficient position lookups, owning the text.
LineStartsCache
Caches byte offsets for line starts to speed up coordinate conversion.
Position
A position in a source file with byte offset, line, and column
PositionMapper
Centralized position mapper using rope for efficiency.
Range
A range in a source file defined by start and end positions
WireLocation
A protocol-facing location that combines a URI and a range.
WirePosition
A protocol-facing LSP position.
WireRange
A protocol-facing LSP range with inclusive start and exclusive end.

Enums§

LineEnding
Line ending style detected in a document

Functions§

apply_edit_utf8
Apply UTF-8 edit to a string.
offset_to_utf16_line_col
Converts a byte offset into (line, column_utf16) coordinates.
utf16_line_col_to_offset
Converts (line, column_utf16) coordinates into a byte offset.