Skip to content

Commit

Permalink
Merge pull request #18813 from Giga-Bowser/syntax-tree-view
Browse files Browse the repository at this point in the history
feat: Add a new and improved syntax tree view
  • Loading branch information
Veykril authored Jan 10, 2025
2 parents b75a969 + c0f22c7 commit d133136
Show file tree
Hide file tree
Showing 15 changed files with 812 additions and 701 deletions.
12 changes: 3 additions & 9 deletions crates/ide/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ mod ssr;
mod static_index;
mod status;
mod syntax_highlighting;
mod syntax_tree;
mod test_explorer;
mod typing;
mod view_crate_graph;
mod view_hir;
mod view_item_tree;
mod view_memory_layout;
mod view_mir;
mod view_syntax_tree;

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

Expand Down Expand Up @@ -329,14 +329,8 @@ impl Analysis {
})
}

/// Returns a syntax tree represented as `String`, for debug purposes.
// FIXME: use a better name here.
pub fn syntax_tree(
&self,
file_id: FileId,
text_range: Option<TextRange>,
) -> Cancellable<String> {
self.with_db(|db| syntax_tree::syntax_tree(db, file_id, text_range))
pub fn view_syntax_tree(&self, file_id: FileId) -> Cancellable<String> {
self.with_db(|db| view_syntax_tree::view_syntax_tree(db, file_id))
}

pub fn view_hir(&self, position: FilePosition) -> Cancellable<String> {
Expand Down
338 changes: 0 additions & 338 deletions crates/ide/src/syntax_tree.rs

This file was deleted.

Loading

0 comments on commit d133136

Please sign in to comment.