Add fix for incorrect case diagnostic

This commit is contained in:
Igor Aleksanov 2020-10-03 17:34:52 +03:00
parent 17f1026c46
commit e24e22f288
8 changed files with 112 additions and 30 deletions

View file

@ -23,6 +23,10 @@ impl SyntaxNodePtr {
SyntaxNodePtr { range: node.text_range(), kind: node.kind() }
}
pub fn text_range(&self) -> TextRange {
self.range.clone()
}
pub fn to_node(&self, root: &SyntaxNode) -> SyntaxNode {
assert!(root.parent().is_none());
successors(Some(root.clone()), |node| {