Expand description
Rendering logic for ParseStack errors.
ConstantsΒ§
- SNIPPET_
SIZE π - The maximum snippet length before showing a
β¦indicator.
FunctionsΒ§
- expected_
message π - Formats the given expected literals into a single βexpectedβ message:
- line_
bounds π - Returns the start and end byte offsets of the line containing
at. - snippet_
at π - Returns a preview of the input starting at
from, truncated toSNIPPET_SIZEchars or the next newline. - underline π
- Returns the indentation and the underline for the span between
span_startandat. - write_
footer_ πmessage - Writes a potentially multi-line footer message for a parser layer.