X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=ast.c;h=da185168b81f850872664f7b3d3ec14ea6423ea2;hb=5252fe4c72cb4fa138c518dca6e1d574da079d7b;hp=3d8c045d13b520cfff3547d624c0156bfee876b0;hpb=af75875e8faedae0deb5571f503a9c0f521ff298;p=cparser diff --git a/ast.c b/ast.c index 3d8c045..da18516 100644 --- a/ast.c +++ b/ast.c @@ -237,6 +237,7 @@ static void print_select(const select_expression_t *expression) void print_expression(const expression_t *expression) { switch(expression->type) { + case EXPR_UNKNOWN: case EXPR_INVALID: fprintf(out, "*invalid expression*"); break; @@ -518,9 +519,13 @@ void print_initializer(const initializer_t *initializer) static void print_normal_declaration(const declaration_t *declaration) { - print_storage_class(declaration->storage_class); + print_storage_class((storage_class_t)declaration->storage_class); print_type_ext(declaration->type, declaration->symbol, &declaration->context); + if(declaration->is_inline) { + fputs("inline ", out); + } + if(declaration->type->type == TYPE_FUNCTION) { if(declaration->init.statement != NULL) { fputs("\n", out);