mruby-compiler: improve yield node dump to use callargs formatter

changed NODE_YIELD dump from dump_recur to dump_callargs for consistent
argument display format. added null check to handle yield without args.

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Yukihiro "Matz" Matsumoto
2025-09-30 21:21:41 +09:00
parent 1ef60b6201
commit 5339a915df
2 changed files with 6 additions and 2 deletions
+3 -1
View File
@@ -8233,7 +8233,9 @@ dump_node(mrb_state *mrb, node *tree, int offset)
case NODE_YIELD:
printf("NODE_YIELD:\n");
dump_recur(mrb, YIELD_NODE_ARGS(tree), offset+1);
if (YIELD_NODE_ARGS(tree)) {
dump_callargs(mrb, YIELD_NODE_ARGS(tree), offset, lineno);
}
break;
case NODE_REDO:
+3 -1
View File
@@ -15062,7 +15062,9 @@ dump_node(mrb_state *mrb, node *tree, int offset)
case NODE_YIELD:
printf("NODE_YIELD:\n");
dump_recur(mrb, YIELD_NODE_ARGS(tree), offset+1);
if (YIELD_NODE_ARGS(tree)) {
dump_callargs(mrb, YIELD_NODE_ARGS(tree), offset, lineno);
}
break;
case NODE_REDO: