mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-compiler: improve dynamic symbol dump to show node structure
Enhanced NODE_DSYM dump to use dump_node() instead of dump_str() for
the symbol's content list. Dynamic symbols (:"#{expr}") contain node
lists that may include complex interpolated expressions, not just simple
strings, so they need full node dumping to properly display their structure.
This provides much better visibility into interpolated symbol content
and makes debugging dynamic symbols more effective.
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -7772,7 +7772,7 @@ dump_node(mrb_state *mrb, node *tree, int offset)
|
||||
|
||||
case NODE_DSYM:
|
||||
printf("NODE_DSYM:\n");
|
||||
dump_str(mrb, dsym_node(tree)->list, offset+1, lineno);
|
||||
dump_node(mrb, dsym_node(tree)->list, offset+1);
|
||||
break;
|
||||
|
||||
case NODE_LVAR:
|
||||
|
||||
@@ -14601,7 +14601,7 @@ dump_node(mrb_state *mrb, node *tree, int offset)
|
||||
|
||||
case NODE_DSYM:
|
||||
printf("NODE_DSYM:\n");
|
||||
dump_str(mrb, dsym_node(tree)->list, offset+1, lineno);
|
||||
dump_node(mrb, dsym_node(tree)->list, offset+1);
|
||||
break;
|
||||
|
||||
case NODE_LVAR:
|
||||
@@ -15037,7 +15037,7 @@ dump_node(mrb_state *mrb, node *tree, int offset)
|
||||
printf("key:\n");
|
||||
if (node_to_sym(pairs->car->car) == MRB_OPSYM(pow)) {
|
||||
dump_prefix(offset+2, lineno);
|
||||
printf("**:\n");
|
||||
printf("**\n");
|
||||
}
|
||||
else {
|
||||
dump_node(mrb, pairs->car->car, offset+2);
|
||||
|
||||
Reference in New Issue
Block a user