Slightly change whitespace when printing for-statements.
authorChristoph Mallon <christoph.mallon@gmx.de>
Sun, 7 Dec 2008 17:35:19 +0000 (17:35 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Sun, 7 Dec 2008 17:35:19 +0000 (17:35 +0000)
[r24376]

ast.c

diff --git a/ast.c b/ast.c
index 498393c..bf93a14 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -1124,18 +1124,19 @@ static void print_for_statement(const for_statement_t *statement)
                if (entity->base.next != NULL) {
                        panic("multiple declarations in for statement not supported yet");
                }
-               fputc(' ', out);
        } else {
                if (statement->initialisation) {
                        print_expression(statement->initialisation);
                }
-               fputs("; ", out);
+               fputc(';', out);
        }
        if (statement->condition != NULL) {
+               fputc(' ', out);
                print_expression(statement->condition);
        }
-       fputs("; ", out);
+       fputc(';', out);
        if (statement->step != NULL) {
+               fputc(' ', out);
                print_expression(statement->step);
        }
        fputs(") ", out);