summaryrefslogtreecommitdiff
path: root/node.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-16 07:24:53 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-16 07:24:53 +0000
commit4b6f3bce2502e6bbe0a600aef61c8c129fa2af3e (patch)
treeb5f5a66e14d6a0096fd8bf11bca56ee4db66437c /node.c
parent56524df980f431116a00d0a0012700cbd8f4737f (diff)
node.c: Stop double meaning of NODE_FOR by introducing NODE_FOR_MASGN
NODE_FOR was used both for "for"-statement itself and for multi-assignment of for-statement (for x, y, in...end). This change separates the two purposes, NODE_FOR for the former, and newly introduced NODE_FOR_MASGN for the latter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'node.c')
-rw-r--r--node.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/node.c b/node.c
index 4770f7cfd2..1ea6cade20 100644
--- a/node.c
+++ b/node.c
@@ -240,6 +240,14 @@ dump_node(VALUE buf, VALUE indent, int comment, const NODE * node)
F_NODE(nd_body, "body");
return;
+ case NODE_FOR_MASGN:
+ ANN("vars of for statement with masgn");
+ ANN("format: for [nd_var] in ... do ... end");
+ ANN("example: for x, y in 1..3 do foo end");
+ LAST_NODE;
+ F_NODE(nd_var, "var");
+ return;
+
case NODE_BREAK:
ANN("break statement");
ANN("format: break [nd_stts]");