static void print_call_expression(const call_expression_t *call)
{
- print_expression(call->method);
+ print_expression(call->function);
fprintf(out, "(");
call_argument_t *argument = call->arguments;
int first = 1;
{
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 {
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");
}
+ fputc(' ', out);
} else if(statement->initialisation) {
print_expression(statement->initialisation);
+ fputs("; ", out);
}
- fputs("; ", out);
if(statement->condition != NULL) {
print_expression(statement->condition);
}
print_storage_class(declaration->storage_class);
print_type_ext(declaration->type, declaration->symbol,
&declaration->context);
- if(declaration->type->type == TYPE_METHOD) {
+ if(declaration->type->type == TYPE_FUNCTION) {
if(declaration->init.statement != NULL) {
fputs("\n", out);
print_statement(declaration->init.statement);
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 &&