summaryrefslogtreecommitdiff
path: root/node_dump.c
diff options
context:
space:
mode:
authoryui-knk <[email protected]>2024-07-25 10:37:24 +0900
committerYuichiro Kaneko <[email protected]>2024-07-25 13:23:14 +0900
commit357ae357e8fb57164b2c3f7b48d9224de548f244 ()
treee07a8071aef03a6a6ef74b1ba1b400892af6533e /node_dump.c
parent30eba40f9c0246cc1a222846dc1b8245c79f8257 (diff)
Dump forwarding field of `struct rb_args_info` and `struct RNode_BLOCK_PASS`
Notes: Merged: https://.com/ruby/ruby/pull/11240
-rw-r--r--node_dump.c12
1 files changed, 12 insertions, 0 deletions
@@ -886,6 +886,12 @@ dump_node(VALUE buf, VALUE indent, int comment, const NODE * node)
ANN("arguments with block argument");
ANN("format: ..([nd_head], &[nd_body])");
ANN("example: foo(x, &blk)");
F_NODE(nd_head, RNODE_BLOCK_PASS, "other arguments");
LAST_NODE;
F_NODE(nd_body, RNODE_BLOCK_PASS, "block argument");
@@ -1106,6 +1112,12 @@ dump_node(VALUE buf, VALUE indent, int comment, const NODE * node)
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("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");