Refactor append_gen function.

This commit is contained in:
Yukihiro "Matz" Matsumoto
2019-10-03 07:52:03 +09:00
parent a406a35cf8
commit 306f02117b
+2 -3
View File
@@ -202,12 +202,11 @@ append_gen(parser_state *p, node *a, node *b)
node *c = a;
if (!a) return b;
if (!b) return a;
while (c->cdr) {
c = c->cdr;
}
if (b) {
c->cdr = b;
}
c->cdr = b;
return a;
}
#define append(a,b) append_gen(p,(a),(b))