Skip to content

Commit 5adca85

Browse files
authored
Merge pull request rust-lang#18813 from Giga-Bowser/syntax-tree-view
feat: Add a new and improved syntax tree view
2 parents 669d34d + 56d06fb commit 5adca85

File tree

15 files changed

+812
-701
lines changed

15 files changed

+812
-701
lines changed

src/tools/rust-analyzer/crates/ide/src/lib.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ mod ssr;
4848
mod static_index;
4949
mod status;
5050
mod syntax_highlighting;
51-
mod syntax_tree;
5251
mod test_explorer;
5352
mod typing;
5453
mod view_crate_graph;
5554
mod view_hir;
5655
mod view_item_tree;
5756
mod view_memory_layout;
5857
mod view_mir;
58+
mod view_syntax_tree;
5959

6060
use std::{iter, panic::UnwindSafe};
6161

@@ -329,14 +329,8 @@ impl Analysis {
329329
})
330330
}
331331

332-
/// Returns a syntax tree represented as `String`, for debug purposes.
333-
// FIXME: use a better name here.
334-
pub fn syntax_tree(
335-
&self,
336-
file_id: FileId,
337-
text_range: Option<TextRange>,
338-
) -> Cancellable<String> {
339-
self.with_db(|db| syntax_tree::syntax_tree(db, file_id, text_range))
332+
pub fn view_syntax_tree(&self, file_id: FileId) -> Cancellable<String> {
333+
self.with_db(|db| view_syntax_tree::view_syntax_tree(db, file_id))
340334
}
341335

342336
pub fn view_hir(&self, position: FilePosition) -> Cancellable<String> {

src/tools/rust-analyzer/crates/ide/src/syntax_tree.rs

Lines changed: 0 additions & 338 deletions
This file was deleted.

0 commit comments

Comments
 (0)