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:
James Westman 2022-07-18 15:43:39 -05:00
parent d7155981b1
commit ae40f8416f
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
4 changed files with 37 additions and 12 deletions

View file

@ -49,9 +49,7 @@ class IdentExpr(AstNode):
if self.is_this:
raise CompilerBugError()
xml.start_tag("constant")
xml.put_text(self.tokens["ident"])
xml.end_tag()
self.parent_by_type(Scope).variables[self.tokens["ident"]].emit_xml(xml)
class LookupOp(InfixExpr):