aboutsummaryrefslogtreecommitdiff
path: root/src/utils.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-07-30 21:45:10 +0100
committerAleksey Kladov <[email protected]>2018-07-30 21:45:10 +0100
commitaea86d154ec5adde6adb05088a50f01380ffb8bf (patch)
treefd10ec3e5379e24e40f3eff78cb1e035f4bb5c89 /src/utils.rs
parent70b337292117a9bb90e85056dcb4069f8bbc6c0a (diff)
stackless traversal
Diffstat (limited to 'src/utils.rs')
-rw-r--r--src/utils.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils.rs b/src/utils.rs
index 20991659a..826a7d60b 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -3,7 +3,7 @@ use {SyntaxError, SyntaxNode, SyntaxNodeRef};
3 3
4/// Parse a file and create a string representation of the resulting parse tree. 4/// Parse a file and create a string representation of the resulting parse tree.
5pub fn dump_tree(syntax: &SyntaxNode) -> String { 5pub fn dump_tree(syntax: &SyntaxNode) -> String {
6 let syntax = syntax.borrow(); 6 let syntax = syntax.as_ref();
7 let mut errors: BTreeSet<_> = syntax.root.errors.iter().cloned().collect(); 7 let mut errors: BTreeSet<_> = syntax.root.errors.iter().cloned().collect();
8 let mut result = String::new(); 8 let mut result = String::new();
9 go(syntax, &mut result, 0, &mut errors); 9 go(syntax, &mut result, 0, &mut errors);