mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +00:00
support replacing root node
This commit is contained in:
parent
b565d8db74
commit
41dbaa415a
3 changed files with 200 additions and 14 deletions
|
@ -108,7 +108,6 @@ impl SyntaxMapping {
|
|||
input_ancestor: &SyntaxNode,
|
||||
output_ancestor: &SyntaxNode,
|
||||
) -> Result<Vec<usize>, MissingMapping> {
|
||||
eprintln!("mapping ancestor {input_ancestor:#?} to {output_ancestor:#?}");
|
||||
let mut current =
|
||||
self.upmap_node_single(input_ancestor).unwrap_or_else(|| input_ancestor.clone());
|
||||
let mut upmap_chain = vec![current.index()];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue