+static void write_enum_type(const enum_type_t *type)
+{
+ declaration_t *declaration = find_typedef((const type_t*) type);
+ if(declaration != NULL) {
+ fprintf(out, "%s", declaration->symbol->string);
+ return;
+ }
+
+ /* does the enum have a name? */
+ if(type->symbol != NULL) {
+ /* TODO: make sure we create an enum for it... */
+ fprintf(out, "%s", type->symbol->string);
+ return;
+ }
+ /* TODO: create a struct and use its name here... */
+ fprintf(out, "/* TODO anonymous enum */byte");
+}
+