mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
Update rowan
This commit is contained in:
parent
2a704035f4
commit
00cdde2c52
8 changed files with 26 additions and 49 deletions
|
@ -1,6 +1,5 @@
|
|||
use crate::{
|
||||
algo::walk::{walk, WalkEvent},
|
||||
File, SyntaxKind, SyntaxNodeRef,
|
||||
File, SyntaxKind, SyntaxNodeRef, WalkEvent
|
||||
};
|
||||
use std::fmt::Write;
|
||||
|
||||
|
@ -19,7 +18,7 @@ pub fn dump_tree(syntax: SyntaxNodeRef) -> String {
|
|||
};
|
||||
}
|
||||
|
||||
for event in walk(syntax) {
|
||||
for event in syntax.preorder() {
|
||||
match event {
|
||||
WalkEvent::Enter(node) => {
|
||||
indent!();
|
||||
|
@ -34,7 +33,7 @@ pub fn dump_tree(syntax: SyntaxNodeRef) -> String {
|
|||
}
|
||||
level += 1;
|
||||
}
|
||||
WalkEvent::Exit(_) => level -= 1,
|
||||
WalkEvent::Leave(_) => level -= 1,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue