mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 18:58:36 +00:00
lsp: Rename structs and enums
... but only when directly on the name of the struct when it is declared.
This commit is contained in:
parent
7893c5a00c
commit
cfb2324526
4 changed files with 1018 additions and 139 deletions
|
@ -826,6 +826,12 @@ impl SyntaxNode {
|
|||
.find(|n| n.kind() == kind)
|
||||
.and_then(|x| x.as_token().map(|x| x.text().into()))
|
||||
}
|
||||
pub fn descendants(&self) -> impl Iterator<Item = SyntaxNode> {
|
||||
let source_file = self.source_file.clone();
|
||||
self.node
|
||||
.descendants()
|
||||
.map(move |node| SyntaxNode { node, source_file: source_file.clone() })
|
||||
}
|
||||
pub fn kind(&self) -> SyntaxKind {
|
||||
self.node.kind()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue