mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Refactor append_gen function.
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user