mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Fix enums with "-"/"_" in the name
This commit is contained in:
parent
f2b7d3bd95
commit
c4beb6841c
5 changed files with 21 additions and 1 deletions
|
@ -408,7 +408,10 @@ class FlagsValue(Value):
|
|||
|
||||
class IdentValue(Value):
|
||||
def emit_xml(self, xml: XmlEmitter):
|
||||
xml.put_text(self.tokens["value"])
|
||||
if isinstance(self.parent.value_type, gir.Enumeration):
|
||||
xml.put_text(self.parent.value_type.members[self.tokens["value"]].nick)
|
||||
else:
|
||||
xml.put_text(self.tokens["value"])
|
||||
|
||||
@validate()
|
||||
def validate_for_type(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue