aboutsummaryrefslogtreecommitdiff
path: root/crates/libeditor/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/libeditor/src/lib.rs')
-rw-r--r--crates/libeditor/src/lib.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/crates/libeditor/src/lib.rs b/crates/libeditor/src/lib.rs
index 293fafae7..4ea344b17 100644
--- a/crates/libeditor/src/lib.rs
+++ b/crates/libeditor/src/lib.rs
@@ -2,16 +2,21 @@ extern crate libsyntax2;
2extern crate superslice; 2extern crate superslice;
3 3
4mod extend_selection; 4mod extend_selection;
5mod symbols;
5mod line_index; 6mod line_index;
6 7
7use libsyntax2::{ 8use libsyntax2::{
8 ast, 9 ast::{self, NameOwner},
9 SyntaxNodeRef, AstNode, 10 SyntaxNodeRef, AstNode,
10 algo::walk, 11 algo::walk,
11 SyntaxKind::*, 12 SyntaxKind::*,
12}; 13};
13pub use libsyntax2::{File, TextRange, TextUnit}; 14pub use libsyntax2::{File, TextRange, TextUnit};
14pub use self::line_index::{LineIndex, LineCol}; 15pub use self::{
16 line_index::{LineIndex, LineCol},
17 extend_selection::extend_selection,
18 symbols::{FileSymbol, file_symbols}
19};
15 20
16#[derive(Debug)] 21#[derive(Debug)]
17pub struct HighlightedRange { 22pub struct HighlightedRange {
@@ -108,11 +113,6 @@ pub fn symbols(file: &ast::File) -> Vec<Symbol> {
108 res // NLL :-( 113 res // NLL :-(
109} 114}
110 115
111pub fn extend_selection(file: &ast::File, range: TextRange) -> Option<TextRange> {
112 let syntax = file.syntax();
113 extend_selection::extend_selection(syntax.as_ref(), range)
114}
115
116pub fn runnables(file: &ast::File) -> Vec<Runnable> { 116pub fn runnables(file: &ast::File) -> Vec<Runnable> {
117 file 117 file
118 .functions() 118 .functions()