Refactor `append_gen` function.
MODIFY
mrbgems/mruby-compiler/core/parse.y
mrbgems/mruby-compiler/core/parse.y
@@ -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;
- }
return a;
}
#define append(a,b) append_gen(p,(a),(b))

Refactor `append_gen` function.