mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Separate output into its own module
This commit is contained in:
parent
8cf793023d
commit
a24f16109f
33 changed files with 407 additions and 291 deletions
|
@ -32,17 +32,6 @@ class BaseAttribute(AstNode):
|
|||
def name(self):
|
||||
return self.tokens["name"]
|
||||
|
||||
def emit_xml(self, xml: XmlEmitter):
|
||||
value = self.children[Value][0]
|
||||
attrs = { self.attr_name: self.name }
|
||||
|
||||
if isinstance(value, TranslatedStringValue):
|
||||
attrs = { **attrs, **value.attrs }
|
||||
|
||||
xml.start_tag(self.tag_name, **attrs)
|
||||
value.emit_xml(xml)
|
||||
xml.end_tag()
|
||||
|
||||
|
||||
class BaseTypedAttribute(BaseAttribute):
|
||||
""" A BaseAttribute whose parent has a value_type property that can assist
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue