make ancestors and descendants inherent

This commit is contained in:
Aleksey Kladov 2018-10-02 18:02:57 +03:00
parent dccaa5e45e
commit d323c81d5c
14 changed files with 40 additions and 46 deletions

View file

@ -1,6 +1,6 @@
use std::fmt::Write;
use {
algo::walk::{preorder, walk, WalkEvent},
algo::walk::{walk, WalkEvent},
SyntaxKind, File, SyntaxNodeRef
};
@ -56,7 +56,7 @@ pub fn check_fuzz_invariants(text: &str) {
pub(crate) fn validate_block_structure(root: SyntaxNodeRef) {
let mut stack = Vec::new();
for node in preorder(root) {
for node in root.descendants() {
match node.kind() {
SyntaxKind::L_CURLY => {
stack.push(node)