Fine tune error display.
This commit is contained in:
parent
75275371ac
commit
248888ce0b
@ -51,8 +51,7 @@ impl fmt::Display for LexError {
|
|||||||
Self::ImproperSymbol(s, d) if d.is_empty() => {
|
Self::ImproperSymbol(s, d) if d.is_empty() => {
|
||||||
write!(f, "Invalid symbol encountered: '{}'", s)
|
write!(f, "Invalid symbol encountered: '{}'", s)
|
||||||
}
|
}
|
||||||
Self::ImproperSymbol(s, d) if s.is_empty() => f.write_str(d),
|
Self::ImproperSymbol(.., d) => f.write_str(d),
|
||||||
Self::ImproperSymbol(s, d) => write!(f, "{}: '{}'", d, s),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user