mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Borrowed AST
This commit is contained in:
parent
70097504f7
commit
d3c90ded2b
16 changed files with 350 additions and 343 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue