projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
edd7b83
)
Simplify printing the seperator (", ") between call arguments.
author
Christoph Mallon
<christoph.mallon@gmx.de>
Tue, 27 Mar 2012 11:32:54 +0000
(13:32 +0200)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Tue, 27 Mar 2012 11:32:54 +0000
(13:32 +0200)
ast.c
patch
|
blob
|
history
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(')');