Expand description
Byte-compatible source-line + caret rendering. Port of
SourceErrorManager::buildSourceAndCaretLine and printDiagnosticHelper.
Structs§
- Stderr
Handler - Default handler: prints
file:line:col: kind: message, the source line, and (for all-ASCII lines) a caret/underline. Port ofprintDiagnosticHelper.
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
ResolvedDiagnosticto aString. The returned string ends with a newline. Produces: