dispatch acros roots

This commit is contained in:
Aleksey Kladov 2018-09-03 19:46:30 +03:00
parent 2f2feef9af
commit b04c14d4ad
5 changed files with 180 additions and 75 deletions

View file

@ -68,6 +68,9 @@ impl AnalysisHost {
pub fn set_crate_graph(&mut self, graph: CrateGraph) {
self.imp.set_crate_graph(graph)
}
pub fn set_libraries(&mut self, libs: impl Iterator<Item=impl Iterator<Item=(FileId, String)>>) {
self.imp.set_libraries(libs)
}
}
#[derive(Debug)]
@ -114,6 +117,7 @@ pub struct Query {
query: String,
lowercased: String,
only_types: bool,
libs: bool,
exact: bool,
limit: usize,
}
@ -125,6 +129,7 @@ impl Query {
query,
lowercased,
only_types: false,
libs: false,
exact: false,
limit: usize::max_value()
}
@ -132,6 +137,9 @@ impl Query {
pub fn only_types(&mut self) {
self.only_types = true;
}
pub fn libs(&mut self) {
self.libs = true;
}
pub fn exact(&mut self) {
self.exact = true;
}