mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
completions: Add types in typeof<> and as<>
This commit is contained in:
parent
d5b2ee3589
commit
e9206809d6
10 changed files with 124 additions and 39 deletions
|
@ -196,6 +196,13 @@ class AstNode:
|
|||
|
||||
return None
|
||||
|
||||
def get_child_at(self, idx: int) -> "AstNode":
|
||||
for child in self.children:
|
||||
if idx in child.range:
|
||||
return child.get_child_at(idx)
|
||||
|
||||
return self
|
||||
|
||||
def get_semantic_tokens(self) -> T.Iterator[SemanticToken]:
|
||||
for child in self.children:
|
||||
yield from child.get_semantic_tokens()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue