Fixed error formatting column indicator

This commit is contained in:
Sasha Koshka 2022-08-10 14:08:04 -04:00
parent 314c045e65
commit d43a2540cf
1 changed files with 3 additions and 3 deletions

View File

@ -58,7 +58,7 @@ func (err Error) Error () (formattedMessage string) {
// print an arrow with a tail spanning the width of the mistake
columnCountdown := err.Location.column
for columnCountdown > 0 {
for columnCountdown > 1 {
formattedMessage += " "
columnCountdown --
}
@ -66,9 +66,9 @@ func (err Error) Error () (formattedMessage string) {
// TODO: for tabs, print out 8 of these instead.
formattedMessage += "-"
}
formattedMessage += "-\n"
formattedMessage += "^\n"
}
formattedMessage += err.message + "-\n"
formattedMessage += err.message + "\n"
return
}