From f797c81155e9b7371b24801efac3fcbd236fc9ab Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 7 Jan 2018 12:13:01 +0300 Subject: Smart eof for blocks --- tests/parser.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/parser.rs b/tests/parser.rs index 6c31463ad..7fde365c9 100644 --- a/tests/parser.rs +++ b/tests/parser.rs @@ -61,8 +61,12 @@ fn dump_tree(file: &File) -> String { fn go(node: Node, buff: &mut String, level: usize) { buff.push_str(&String::from(" ").repeat(level)); - write!(buff, "{:?}\n", node) - .unwrap(); + write!(buff, "{:?}", node).unwrap(); + for err in node.errors() { + write!(buff, " err: `{}`", err.message()).unwrap(); + } + write!(buff, "\n").unwrap(); + for child in node.children() { go(child, buff, level + 1) } -- cgit v1.2.3