diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-16 07:24:53 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-16 07:24:53 +0000 |
commit | 4b6f3bce2502e6bbe0a600aef61c8c129fa2af3e (patch) | |
tree | b5f5a66e14d6a0096fd8bf11bca56ee4db66437c /node.c | |
parent | 56524df980f431116a00d0a0012700cbd8f4737f (diff) | |
download | bundler-4b6f3bce2502e6bbe0a600aef61c8c129fa2af3e.tar.gz |
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.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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]"); |