Change template syntax

Templates now use a TypeName instead of an identifier, which makes it
clearer that it's an extern symbol (or that it's a Gtk.ListItem).
This commit is contained in:
James Westman 2023-05-09 19:42:33 -05:00
parent aebf8be278
commit 04509e4b2e
31 changed files with 175 additions and 55 deletions

View file

@ -85,9 +85,9 @@ class LiteralExpr(ExprBase):
def is_object(self) -> bool:
from .values import IdentLiteral
return (
isinstance(self.literal.value, IdentLiteral)
and self.literal.value.ident in self.context[ScopeCtx].objects
return isinstance(self.literal.value, IdentLiteral) and (
self.literal.value.ident in self.context[ScopeCtx].objects
or self.root.is_legacy_template(self.literal.value.ident)
)
@property