mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Clean up AST code
This commit is contained in:
parent
d7a8a21b8e
commit
dc7c0cabd8
5 changed files with 171 additions and 412 deletions
|
@ -28,7 +28,7 @@ Pattern = T.List[T.Tuple[TokenType, T.Optional[str]]]
|
|||
|
||||
|
||||
def complete(ast_node: ast.AstNode, tokens: T.List[Token], idx: int) -> T.Iterator[Completion]:
|
||||
for child in ast_node.child_nodes:
|
||||
for child in ast_node.children:
|
||||
if child.group.start <= idx <= child.group.end:
|
||||
yield from complete(child, tokens, idx)
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue