Fixed error formatting column indicator
This commit is contained in:
parent
314c045e65
commit
d43a2540cf
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user