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

@ -112,7 +112,7 @@ fn find_reparsable_node<'node>(
range: TextRange,
) -> Option<(SyntaxNodeRef<'node>, fn(&mut Parser))> {
let node = algo::find_covering_node(node, range);
return algo::ancestors(node)
return node.ancestors()
.filter_map(|node| reparser(node).map(|r| (node, r)))
.next();