glance_armstrong
Two-line terminal diagnostics: line | source then padded ^ + message.
Used by schema_definition.format_parse_error.
Values
pub fn format_diagnostic_without_span(message: String) -> String
Same visual style when no byte span exists (unknown or out-of-range).
pub fn format_diagnostic_without_span_with_tips(
message: String,
tips: List(String),
) -> String
Like format_diagnostic_without_span, then bullet tips.
pub fn format_glance_parse_error(
source: String,
error: glance.Error,
) -> String
pub fn format_reference_line(
line_no: Int,
line_text: String,
message: String,
) -> String
Same gutter as format_source_diagnostic, for an arbitrary line (e.g. extra notes).
pub fn format_source_diagnostic(
source: String,
span: glance.Span,
message: String,
) -> String
line | full line text then a second line with spaces, carets, and message.
pub fn format_source_diagnostic_with_tips(
source: String,
span: glance.Span,
message: String,
tips: List(String),
) -> String
Like format_source_diagnostic, then bullet tips (for longer help text).