mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
reorganization: Move decompilers
This commit is contained in:
parent
ee5f32622f
commit
1150ae1a09
11 changed files with 138 additions and 140 deletions
|
@ -44,3 +44,13 @@ class Template(Object):
|
|||
for child in self.children:
|
||||
child.emit_xml(xml)
|
||||
xml.end_tag()
|
||||
|
||||
|
||||
@decompiler("template")
|
||||
def decompile_template(ctx: DecompileCtx, gir, klass, parent="Widget"):
|
||||
gir_class = ctx.type_by_cname(parent)
|
||||
if gir_class is None:
|
||||
ctx.print(f"template {klass} : .{parent} {{")
|
||||
else:
|
||||
ctx.print(f"template {klass} : {decompile.full_name(gir_class)} {{")
|
||||
return gir_class
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue