conversion rules for first citizin enum types #1276

This commit is contained in:
Thomas Krijnen
2021-02-14 12:19:06 +01:00
parent cc2138463e
commit e6592ca706
4 changed files with 41 additions and 6 deletions
@@ -223,6 +223,9 @@ class Implementation(codegen.Base):
schema_entity_statements += [
templates.schema_entity_stmt % locals() for name, type in mapping.schema.simpletypes.items()
]
schema_entity_statements += [
templates.schema_entity_stmt % locals() for name, type in mapping.schema.enumerations.items()
]
schema_entity_statements += [
templates.schema_entity_stmt % locals() for name, type in mapping.schema.entities.items()
]
@@ -329,6 +332,8 @@ class Implementation(codegen.Base):
("extern entity* %s_%%s_type;" % schema_name_upper) % n for n in mapping.schema.entities.keys()
] + [
("extern type_declaration* %s_%%s_type;" % schema_name_upper) % n for n in mapping.schema.simpletypes.keys()
] + [
("extern enumeration_type* %s_%%s_type;" % schema_name_upper) % n for n in mapping.schema.enumerations.keys()
]
self.str = templates.implementation % {