mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-06-22 23:19:25 -04:00
More errors for duplicates
This commit is contained in:
parent
2ca71de061
commit
6ac798ea6f
13 changed files with 105 additions and 9 deletions
|
@ -175,7 +175,9 @@ class AstNode:
|
|||
for child in self.children:
|
||||
yield from child.get_semantic_tokens()
|
||||
|
||||
def validate_unique_in_parent(self, error, check=None):
|
||||
def validate_unique_in_parent(
|
||||
self, error: str, check: T.Optional[T.Callable[["AstNode"], bool]] = None
|
||||
):
|
||||
for child in self.parent.children:
|
||||
if child is self:
|
||||
break
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue