Skip to main content

Crate wolf_span

Crate wolf_span 

Source
Expand description

Source files, positions and ranges.

Every file the compiler reads is stored once in a SourceMap and identified by a FileId. Positions inside a file are byte offsets (Span). Line and column numbers are computed only when a diagnostic is shown; columns count Unicode scalar values (spec chapter 1, section 1).

Structs§

FileId
Identifies a file inside a SourceMap.
LineCol
A one-based line and column. The column counts Unicode scalar values.
SourceFile
One source file: its display name and its text.
SourceMap
All source files of one compilation.
Span
A range of bytes in one file. start is inclusive, end is exclusive.

Constants§

MAX_FILE_SIZE
The largest file the compiler accepts, in bytes. Offsets are stored as u32.