Skip to main content

Module render

Module render 

Source
Expand description

Byte-compatible source-line + caret rendering. Port of SourceErrorManager::buildSourceAndCaretLine and printDiagnosticHelper.

Structs§

StderrHandler
Default handler: prints file:line:col: kind: message, the source line, and (for all-ASCII lines) a caret/underline. Port of printDiagnosticHelper.

Functions§

build_source_and_caret_line
Build the (expanded) source line and the caret/underline line for a diagnostic. Faithful port of buildSourceAndCaretLine.
render_diagnostic
Render a ResolvedDiagnostic to a String. The returned string ends with a newline. Produces: