mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-05 16:09:07 -04:00
Tweak the way scopes work
Should make it clearer what a "variable" is and allow more flexibility in what a variable can be (previously it could only be an object, but now it can be e.g. a reference to the template or a special shortcut)
This commit is contained in:
parent
d7155981b1
commit
ae40f8416f
4 changed files with 37 additions and 12 deletions
|
@ -38,9 +38,10 @@ class Lambda(Value, Scope):
|
|||
for child in self.children:
|
||||
child.emit_xml(xml)
|
||||
|
||||
def get_objects(self):
|
||||
@property
|
||||
def variables(self) -> T.Dict[str, ScopeVariable]:
|
||||
return {
|
||||
**self.parent.parent_by_type(Scope).get_objects(),
|
||||
**self.parent.parent_by_type(Scope).variables,
|
||||
self.tokens["argument"]: None,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue