+void print_compound_definition(const declaration_t *declaration)
+{
+ fputs("{\n", out);
+ change_indent(1);
+
+ declaration_t *iter = declaration->context.declarations;
+ for( ; iter != NULL; iter = iter->context_next) {
+ print_indent();
+ print_declaration(iter);
+ fputc('\n', out);
+ }
+
+ change_indent(-1);
+ print_indent();
+ fputs("}", out);
+}
+
+static void print_compound_type(const compound_type_t *type)
+{
+ print_type_qualifiers(type->type.qualifiers);
+
+ if(type->type.type == TYPE_COMPOUND_STRUCT) {
+ fputs("struct ", out);
+ } else {
+ assert(type->type.type == TYPE_COMPOUND_UNION);
+ fputs("union ", out);
+ }
+
+ declaration_t *declaration = type->declaration;
+ symbol_t *symbol = declaration->symbol;
+ if(symbol != NULL) {
+ fputs(symbol->string, out);
+ } else {
+ print_compound_definition(declaration);