show error offsets in tests

This commit is contained in:
Aleksey Kladov 2019-05-29 10:12:08 +03:00
parent 7a1cae59ac
commit 2e722ec54b
46 changed files with 299 additions and 290 deletions

View file

@ -76,7 +76,7 @@ impl Parse {
pub fn debug_dump(&self) -> String {
let mut buf = self.tree.syntax().debug_dump();
for err in self.errors.iter() {
writeln!(buf, "err: `{}`", err).unwrap();
writeln!(buf, "error {:?}: {}", err.location(), err.kind()).unwrap();
}
buf
}