Simplify printing the seperator (", ") between call arguments.
authorChristoph Mallon <christoph.mallon@gmx.de>
Tue, 27 Mar 2012 11:32:54 +0000 (13:32 +0200)
committerChristoph Mallon <christoph.mallon@gmx.de>
Tue, 27 Mar 2012 11:32:54 +0000 (13:32 +0200)
ast.c

diff --git a/ast.c b/ast.c
index c71741f..e59e3b1 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -313,13 +313,10 @@ static void print_call_expression(const call_expression_t *call)
 {
        print_expression_prec(call->function, PREC_POSTFIX);
        print_char('(');
-       int first = 1;
+       char const *sep = "";
        for (call_argument_t const *arg = call->arguments; arg; arg = arg->next) {
-               if (!first) {
-                       print_string(", ");
-               } else {
-                       first = 0;
-               }
+               print_string(sep);
+               sep = ", ";
                print_assignment_expression(arg->expression);
        }
        print_char(')');