Module formatted

Source
Expand description

This module contains a formatted error and its methods.

Structsยง

Formatted
Formatted compiler error type undefined value x โ€“> file.leo: 2:8 | 2 | let a = x; | ^ | = help: Initialize a variable x first. Makes use of the same fields as a BacktracedError.
Label
Represents error labels.

Enumsยง

Color
Represents available colors for error labels.

Functionsยง

compute_line_spans ๐Ÿ”’
Compute the start and end columns of the highlight for each line
print_code_line ๐Ÿ”’
Print a single line of code with connector and optional highlight
print_gap ๐Ÿ”’
Print a gap or ellipsis between blocks of code
print_multiline_underline ๐Ÿ”’
Print the final underline for a multi-line highlight (Rust-style with -)