aboutsummaryrefslogtreecommitdiffstats
path: root/node_dump.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-10-30 00:19:43 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-10-30 00:19:43 +0900
commit13c9cbe09ef310c7ddf055d57ebf4586e9f9a111 (patch)
tree1edb88744db0cb8d95b7d0d3e2dc045751a68fc4 /node_dump.c
parentfbd55120f3c58dc7d16b3870a8f36f07277bb338 (diff)
downloadruby-13c9cbe09ef310c7ddf055d57ebf4586e9f9a111.tar.gz
Embed `rb_args_info` in `rb_node_args_t`
Diffstat (limited to 'node_dump.c')
-rw-r--r--node_dump.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/node_dump.c b/node_dump.c
index 2262d0b4a0..391aea10b1 100644
--- a/node_dump.c
+++ b/node_dump.c
@@ -1007,26 +1007,26 @@ dump_node(VALUE buf, VALUE indent, int comment, const NODE * node)
case NODE_ARGS:
ANN("method parameters");
- ANN("format: def method_name(.., [nd_ainfo->nd_optargs], *[nd_ainfo->rest_arg], [nd_ainfo->first_post_arg], .., [nd_ainfo->kw_args], **[nd_ainfo->kw_rest_arg], &[nd_ainfo->block_arg])");
+ ANN("format: def method_name(.., [nd_ainfo.nd_optargs], *[nd_ainfo.rest_arg], [nd_ainfo.first_post_arg], .., [nd_ainfo.kw_args], **[nd_ainfo.kw_rest_arg], &[nd_ainfo.block_arg])");
ANN("example: def foo(a, b, opt1=1, opt2=2, *rest, y, z, kw: 1, **kwrest, &blk); end");
- F_INT(nd_ainfo->pre_args_num, RNODE_ARGS, "count of mandatory (pre-)arguments");
- F_NODE(nd_ainfo->pre_init, RNODE_ARGS, "initialization of (pre-)arguments");
- F_INT(nd_ainfo->post_args_num, RNODE_ARGS, "count of mandatory post-arguments");
- F_NODE(nd_ainfo->post_init, RNODE_ARGS, "initialization of post-arguments");
- F_ID(nd_ainfo->first_post_arg, RNODE_ARGS, "first post argument");
- F_CUSTOM1(nd_ainfo->rest_arg, "rest argument") {
- if (RNODE_ARGS(node)->nd_ainfo->rest_arg == NODE_SPECIAL_EXCESSIVE_COMMA) {
+ F_INT(nd_ainfo.pre_args_num, RNODE_ARGS, "count of mandatory (pre-)arguments");
+ F_NODE(nd_ainfo.pre_init, RNODE_ARGS, "initialization of (pre-)arguments");
+ F_INT(nd_ainfo.post_args_num, RNODE_ARGS, "count of mandatory post-arguments");
+ F_NODE(nd_ainfo.post_init, RNODE_ARGS, "initialization of post-arguments");
+ F_ID(nd_ainfo.first_post_arg, RNODE_ARGS, "first post argument");
+ F_CUSTOM1(nd_ainfo.rest_arg, "rest argument") {
+ if (RNODE_ARGS(node)->nd_ainfo.rest_arg == NODE_SPECIAL_EXCESSIVE_COMMA) {
A("1 (excessed comma)");
}
else {
- A_ID(RNODE_ARGS(node)->nd_ainfo->rest_arg);
+ A_ID(RNODE_ARGS(node)->nd_ainfo.rest_arg);
}
}
- F_ID(nd_ainfo->block_arg, RNODE_ARGS, "block argument");
- F_NODE(nd_ainfo->opt_args, RNODE_ARGS, "optional arguments");
- F_NODE(nd_ainfo->kw_args, RNODE_ARGS, "keyword arguments");
+ F_ID(nd_ainfo.block_arg, RNODE_ARGS, "block argument");
+ F_NODE(nd_ainfo.opt_args, RNODE_ARGS, "optional arguments");
+ F_NODE(nd_ainfo.kw_args, RNODE_ARGS, "keyword arguments");
LAST_NODE;
- F_NODE(nd_ainfo->kw_rest_arg, RNODE_ARGS, "keyword rest argument");
+ F_NODE(nd_ainfo.kw_rest_arg, RNODE_ARGS, "keyword rest argument");
return;
case NODE_SCOPE: