Add View Mir command and fix some bugs

This commit is contained in:
hkalbasi 2023-02-26 16:04:41 +03:30
parent a25710b0c0
commit ac04bfd7a7
23 changed files with 876 additions and 122 deletions

View file

@ -55,6 +55,7 @@ mod syntax_tree;
mod typing;
mod view_crate_graph;
mod view_hir;
mod view_mir;
mod view_item_tree;
mod shuffle_crate_graph;
@ -308,6 +309,10 @@ impl Analysis {
self.with_db(|db| view_hir::view_hir(db, position))
}
pub fn view_mir(&self, position: FilePosition) -> Cancellable<String> {
self.with_db(|db| view_mir::view_mir(db, position))
}
pub fn view_item_tree(&self, file_id: FileId) -> Cancellable<String> {
self.with_db(|db| view_item_tree::view_item_tree(db, file_id))
}