Skip to content

Commit

Permalink
lsp: Rename of enums
Browse files Browse the repository at this point in the history
... in the declaration only.
  • Loading branch information
hunger committed Dec 18, 2024
1 parent b033467 commit 2b38861
Show file tree
Hide file tree
Showing 3 changed files with 305 additions and 18 deletions.
6 changes: 6 additions & 0 deletions internal/compiler/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down
Loading

0 comments on commit 2b38861

Please sign in to comment.