Skip to main content

Module source

Module source 

Source
Expand description

Turning a byte offset back into the line and column an author can act on.

Positions are only reconstructed when an error is raised, so the lexer and the parsers stay free of per-character bookkeeping — the same trade the JSON parser in core makes.

Structs§

Span
A fragment of a template that remembers where it was cut from.

Functions§

line_column
The 1-based line and column of offset inside source.
syntax_error
Build a template error pointing at offset inside source.