From a261a1836ba02a1c091c5165795dc165ca399a87 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 2 Oct 2018 17:07:12 +0300 Subject: Move to rowan for syntax tree impl --- crates/ra_syntax/src/utils.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_syntax/src/utils.rs') diff --git a/crates/ra_syntax/src/utils.rs b/crates/ra_syntax/src/utils.rs index 671dd7afa..8bc5f0e24 100644 --- a/crates/ra_syntax/src/utils.rs +++ b/crates/ra_syntax/src/utils.rs @@ -1,12 +1,12 @@ use std::fmt::Write; use { algo::walk::{preorder, walk, WalkEvent}, - SyntaxKind, File, SyntaxNodeRef, TreeRoot, + SyntaxKind, File, SyntaxNodeRef }; /// Parse a file and create a string representation of the resulting parse tree. pub fn dump_tree(syntax: SyntaxNodeRef) -> String { - let mut errors: Vec<_> = syntax.root.syntax_root().errors.iter().cloned().collect(); + let mut errors: Vec<_> = syntax.root_data().iter().cloned().collect(); errors.sort_by_key(|e| e.offset); let mut err_pos = 0; let mut level = 0; -- cgit v1.2.3