parse.y: small refactoring in mrb_parser_dump().
MODIFY
mrbgems/mruby-compiler/core/parse.y
mrbgems/mruby-compiler/core/parse.y
@@ -7418,15 +7418,13 @@ mrb_parser_dump(mrb_state *mrb, node *tree, int offset)
}
}
n2 = n2->cdr;
- if (n2) {
- if (n2->car) {
+ if (n2 && n2->car) {
dump_prefix(n2, offset+2);
printf("post:\n");
dump_recur(mrb, n2->car, offset+3);
}
}
}
- }
dump_prefix(tree, offset+1);
printf("rhs:\n");
mrb_parser_dump(mrb, tree->cdr, offset+2);

MODIFY
mrbgems/mruby-compiler/core/y.tab.c
mrbgems/mruby-compiler/core/y.tab.c
@@ -13649,15 +13649,13 @@ mrb_parser_dump(mrb_state *mrb, node *tree, int offset)
}
}
n2 = n2->cdr;
- if (n2) {
- if (n2->car) {
+ if (n2 && n2->car) {
dump_prefix(n2, offset+2);
printf("post:\n");
dump_recur(mrb, n2->car, offset+3);
}
}
}
- }
dump_prefix(tree, offset+1);
printf("rhs:\n");
mrb_parser_dump(mrb, tree->cdr, offset+2);

parse.y: small refactoring in mrb_parser_dump().