aboutsummaryrefslogtreecommitdiff
path: root/src/utils.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.rs')
-rw-r--r--src/utils.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/utils.rs b/src/utils.rs
index 327d89a24..a23a57423 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -1,7 +1,7 @@
1use std::{fmt::Write}; 1use std::fmt::Write;
2use { 2use {
3 algo::walk::{walk, WalkEvent},
3 SyntaxNode, 4 SyntaxNode,
4 algo::walk::{WalkEvent, walk},
5}; 5};
6 6
7/// Parse a file and create a string representation of the resulting parse tree. 7/// Parse a file and create a string representation of the resulting parse tree.
@@ -34,13 +34,13 @@ pub fn dump_tree(syntax: &SyntaxNode) -> String {
34 } 34 }
35 } 35 }
36 level += 1; 36 level += 1;
37 }, 37 }
38 WalkEvent::Exit(_) => level -= 1, 38 WalkEvent::Exit(_) => level -= 1,
39 } 39 }
40 } 40 }
41 41
42 assert_eq!(level, 0); 42 assert_eq!(level, 0);
43 for err in errors[err_pos..].iter() { 43 for err in errors[err_pos..].iter() {
44 writeln!(buf, "err: `{}`", err.message).unwrap(); 44 writeln!(buf, "err: `{}`", err.message).unwrap();
45 } 45 }
46 46