mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-19 11:05:45 +00:00
Fix SyntaxError visualize order: message first location later
This commit is contained in:
parent
0d139f9942
commit
3f1b9c6096
1 changed files with 1 additions and 1 deletions
|
@ -125,7 +125,7 @@ impl fmt::Display for CompileError {
|
|||
if self.location.column() > 0 {
|
||||
if let Some(line) = statement.lines().nth(self.location.row() - 1) {
|
||||
// visualize the error, when location and statement are provided
|
||||
return write!(f, "\n{}\n{}", line, self.location.visualize(&error_desc));
|
||||
return write!(f, "{}", self.location.visualize(line, &error_desc));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue