Expand description
§haskelujah-span-chirho
Foundation crate for source location tracking in the Haskelujah compiler. Provides file identifiers, byte offsets, and spans that all other crates use for diagnostics, error reporting, and source mapping.
Zero external dependencies by design — this crate is the root of the dependency graph and must compile fast.
Structs§
- Byte
Offset Chirho - An absolute byte offset from the start of a source file.
- File
IdChirho - A lightweight, copyable identifier for a source file.
- Line
ColChirho - A human-readable line and column number (both 1-based).
- Line
Index Chirho - A precomputed index of newline positions in a source file, enabling efficient byte-offset → line/column conversion for diagnostics.
- Source
MapChirho - Registry that assigns
FileIdChirhovalues and stores file names and contents. All source files loaded by the compiler are registered here so that any span can be resolved back to file name + line/column. - Span
Chirho - A contiguous range of bytes
[start, end)within a source file, identified by aFileIdChirho. - Spanned
Chirho - A value paired with the source span where it was found.