diff options
author | Aleksey Kladov <[email protected]> | 2018-08-17 20:00:13 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-08-17 20:00:13 +0100 |
commit | d3c90ded2b9a4f75e101fa3abc60cd3aebc439c9 (patch) | |
tree | 6d2388eb68605331a0dd090269372bc98dd038cd /crates/libeditor/src/extend_selection.rs | |
parent | 70097504f78c4c41368a0b864a94df95fb9c27f7 (diff) |
Borrowed AST
Diffstat (limited to 'crates/libeditor/src/extend_selection.rs')
-rw-r--r-- | crates/libeditor/src/extend_selection.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/libeditor/src/extend_selection.rs b/crates/libeditor/src/extend_selection.rs index ed7d9b3f7..cb6edb576 100644 --- a/crates/libeditor/src/extend_selection.rs +++ b/crates/libeditor/src/extend_selection.rs | |||
@@ -1,11 +1,10 @@ | |||
1 | use libsyntax2::{ | 1 | use libsyntax2::{ |
2 | ast, AstNode, | 2 | ParsedFile, TextRange, SyntaxNodeRef, |
3 | TextRange, SyntaxNodeRef, | ||
4 | SyntaxKind::WHITESPACE, | 3 | SyntaxKind::WHITESPACE, |
5 | algo::{find_leaf_at_offset, find_covering_node, ancestors}, | 4 | algo::{find_leaf_at_offset, find_covering_node, ancestors}, |
6 | }; | 5 | }; |
7 | 6 | ||
8 | pub fn extend_selection(file: &ast::File, range: TextRange) -> Option<TextRange> { | 7 | pub fn extend_selection(file: &ParsedFile, range: TextRange) -> Option<TextRange> { |
9 | let syntax = file.syntax(); | 8 | let syntax = file.syntax(); |
10 | extend(syntax.as_ref(), range) | 9 | extend(syntax.as_ref(), range) |
11 | } | 10 | } |