Package io.github.protasm.jvmud.compiler.sourcepos
package io.github.protasm.jvmud.compiler.sourcepos
Source position tracking utilities.
Defines LineMap, SourcePos, and SourceSpan
to map offsets to human-friendly file/line/column data, even after preprocessing or generated text
insertion.
SegmentedSourceMapper combines multiple LineMap
instances so diagnostics can refer back to original sources. Callers are expected to supply spans
consistently within a single logical file.
This package is deliberately agnostic to language semantics; it only provides coordinate systems for other phases.
-
ClassDescriptionStateless text + stateful index; safe peeking; maintains line/column via LineMap.Fast line lookup by maintaining offsets of line starts.Mapping implementation that tracks contiguous segments of generated text back to original
LineMaps.Maps offsets in generated/processed text back to the original source.1-based line/column position within a logical source file with absolute offset.Inclusive start, exclusive end span within a single logical source file.