summaryrefslogtreecommitdiff
path: root/node.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-31 15:00:37 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-31 15:00:37 +0000
commit67c574736912003c377218153f9d3b9c0c96a17b (patch)
tree558aea841613b06f6913d1ab22942aecc531a317 /node.c
parent4a6f7633303f2d6eb5ec164dc656cf5d47531960 (diff)
Method reference operator
Introduce the new operator for method reference, `.:`. [Feature #12125] [Feature #13581] [EXPERIMENTAL] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'node.c')
-rw-r--r--node.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/node.c b/node.c
index d81a7319d3..7a962b9dea 100644
--- a/node.c
+++ b/node.c
@@ -934,6 +934,15 @@ dump_node(VALUE buf, VALUE indent, int comment, const NODE * node)
F_NODE(nd_args, "arguments");
return;
+ case NODE_METHREF:
+ ANN("method reference");
+ ANN("format: [nd_recv].:[nd_mid]");
+ ANN("example: foo.:method");
+ F_NODE(nd_recv, "receiver");
+ LAST_NODE;
+ F_ID(nd_mid, "method name");
+ return;
+
case NODE_LAMBDA:
ANN("lambda expression");
ANN("format: -> [nd_body]");