- method_type_t *type = method->type;
-
- fprintf(out, "func ");
- print_type(out, type->result_type);
- fprintf(out, " %s", method->symbol->string);
-
- print_method_parameters(out, method->parameters, type);
-
- if(method->statement != NULL) {
- fprintf(out, ":\n");
- print_statement(out, 0, method->statement);
- } else {
- fprintf(out, "\n");
+ switch(storage_class) {
+ case STORAGE_CLASS_NONE:
+ break;
+ case STORAGE_CLASS_TYPEDEF: fputs("typedef ", out); break;
+ case STORAGE_CLASS_EXTERN: fputs("extern ", out); break;
+ case STORAGE_CLASS_STATIC: fputs("static ", out); break;
+ case STORAGE_CLASS_AUTO: fputs("auto ", out); break;
+ case STORAGE_CLASS_REGISTER: fputs("register ", out); break;