actually use tab-corrected column indices in diagnostic output
This commit is contained in:
parent
ce3967c2de
commit
0cbbcd5b24
1 changed files with 4 additions and 4 deletions
|
@ -20,8 +20,8 @@ pub fn print_diagnostic(
|
|||
|
||||
let mut line_region = InputRegionTag::default();
|
||||
|
||||
let n_before = 3;
|
||||
let n_after = 3;
|
||||
let n_before = 5;
|
||||
let n_after = 5;
|
||||
|
||||
let mut last_lines = Vec::new();
|
||||
let mut next_lines = 0;
|
||||
|
@ -67,8 +67,8 @@ pub fn print_diagnostic(
|
|||
}
|
||||
|
||||
print!("\t{}", "|".bright_magenta());
|
||||
for _ in 0..column_begin { print!("{}", ".".magenta().bold()); }
|
||||
for _ in column_begin..column_end { print!("{}", "^".magenta().bold()); }
|
||||
for _ in 0..column_begin_c { print!("{}", ".".magenta().bold()); }
|
||||
for _ in column_begin_c..column_end_c { print!("{}", "^".magenta().bold()); }
|
||||
print!("\n");
|
||||
|
||||
print!("{} [{}-{}]: {}\n", "error".bright_red(), column_begin, column_end, message.yellow());
|
||||
|
|
Loading…
Reference in a new issue