aboutsummaryrefslogtreecommitdiff
path: root/src/utils.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-07-31 20:29:38 +0100
committerAleksey Kladov <[email protected]>2018-07-31 20:29:38 +0100
commit904a832b7cfc58bcf91ed7a17a5a177f8d36db1c (patch)
tree108049f427c2fd14e6d6086987b7368ed8d7c616 /src/utils.rs
parent8105c14454f8c4f575f16b44ec616ffd045be57f (diff)
format
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