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