Borrowed AST

This commit is contained in:
Aleksey Kladov 2018-08-17 22:00:13 +03:00
parent 70097504f7
commit d3c90ded2b
16 changed files with 350 additions and 343 deletions

View file

@ -1,6 +1,6 @@
use libeditor::{FileSymbol, file_symbols};
use libsyntax2::{
ast,
ParsedFile,
SyntaxKind::{self, *},
};
use fst::{self, IntoStreamer, Streamer};
@ -12,7 +12,7 @@ pub(crate) struct FileSymbols {
}
impl FileSymbols {
pub(crate) fn new(file: &ast::File) -> FileSymbols {
pub(crate) fn new(file: &ParsedFile) -> FileSymbols {
let mut symbols = file_symbols(file)
.into_iter()
.map(|s| (s.name.as_str().to_lowercase(), s))