Expand description
Source files and the mapping from byte offsets back to line and column.
Everything downstream of the lexer works in byte offsets. Line and column are computed only when a diagnostic is rendered, so the common path never pays for them.
Structsยง
- FileId
- Handle to a file inside a
SourceMap. - Location
- A one based line and column pair, suitable for showing to a person.
- Source
File - A single source file, with a precomputed index of where each line starts.
- Source
Map - Owns every file the compiler has seen.