Add lambda values

This commit is contained in:
James Westman 2022-07-09 19:20:15 -05:00
parent 30f0deea34
commit d7155981b1
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
8 changed files with 119 additions and 4 deletions

View file

@ -24,7 +24,7 @@ from .gtkbuilder_template import Template
from .common import *
class UI(AstNode):
class UI(AstNode, Scope):
""" The AST node for the entire file """
grammar = [
@ -62,6 +62,8 @@ class UI(AstNode):
def objects_by_id(self):
return { obj.tokens["id"]: obj for obj in self.iterate_children_recursive() if obj.tokens["id"] is not None }
def get_objects(self):
return self.objects_by_id
@validate()
def gir_errors(self):