Skip to content

Commit 628db53

Browse files
committed
Remove the old syntax tree viewer
1 parent 78c377f commit 628db53

File tree

10 files changed

+1
-700
lines changed

10 files changed

+1
-700
lines changed

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ 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;
@@ -330,16 +329,6 @@ impl Analysis {
330329
})
331330
}
332331

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

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

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

src/tools/rust-analyzer/crates/rust-analyzer/src/handlers/request.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -136,18 +136,6 @@ pub(crate) fn handle_memory_usage(state: &mut GlobalState, _: ()) -> anyhow::Res
136136
Ok(out)
137137
}
138138

139-
pub(crate) fn handle_syntax_tree(
140-
snap: GlobalStateSnapshot,
141-
params: lsp_ext::SyntaxTreeParams,
142-
) -> anyhow::Result<String> {
143-
let _p = tracing::info_span!("handle_syntax_tree").entered();
144-
let id = from_proto::file_id(&snap, &params.text_document.uri)?;
145-
let line_index = snap.file_line_index(id)?;
146-
let text_range = params.range.and_then(|r| from_proto::text_range(&line_index, r).ok());
147-
let res = snap.analysis.syntax_tree(id, text_range)?;
148-
Ok(res)
149-
}
150-
151139
pub(crate) fn handle_view_syntax_tree(
152140
snap: GlobalStateSnapshot,
153141
params: lsp_ext::ViewSyntaxTreeParams,

0 commit comments

Comments
 (0)