X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ast.c;h=5bd7ceaa9218304ab29c2c226421d3da70d17942;hb=22420f9404b76d3ab2536c7d3903cbcf05a792a8;hp=d8b34d849ef381bae75c03e2f142f3f19d88f6b7;hpb=087130404a59dcdd95aa0d7ac7feec2793e9ce87;p=cparser diff --git a/ast.c b/ast.c index d8b34d8..5bd7cea 100644 --- a/ast.c +++ b/ast.c @@ -374,8 +374,8 @@ static void print_declaration_statement( { int first = 1; declaration_t *declaration = statement->declarations_begin; - for( ; declaration != statement->declarations_end->context_next; - declaration = declaration->context_next) { + for( ; declaration != statement->declarations_end->next; + declaration = declaration->next) { if(!first) { print_indent(); } else { @@ -410,7 +410,7 @@ static void print_for_statement(const for_statement_t *statement) if(statement->context.declarations != NULL) { assert(statement->initialisation == NULL); print_declaration(statement->context.declarations); - if(statement->context.declarations->context_next != NULL) { + if(statement->context.declarations->next != NULL) { panic("multiple declarations in for statement not supported yet"); } } else if(statement->initialisation) { @@ -570,7 +570,7 @@ void print_ast(const translation_unit_t *unit) set_print_compound_entries(true); declaration_t *declaration = unit->context.declarations; - for( ; declaration != NULL; declaration = declaration->context_next) { + for( ; declaration != NULL; declaration = declaration->next) { if(declaration->storage_class == STORAGE_CLASS_ENUM_ENTRY) continue; if(declaration->namespace != NAMESPACE_NORMAL &&