summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authoryui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-04 08:20:07 +0000
committeryui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-04 08:20:07 +0000
commit4788522fa693cd21b43f6d2d020ae3b3cacfbce8 (patch)
tree36a2f2dd14fc49656123481c11d7d5ad12549bad /parse.y
parent81d8c29a211516023f91839070f52d745bb15fe2 (diff)
parse.y: Fix a location of NODE_BLOCK_PASS
* parse.y (arg_append_gen): Update the last location of NODE_BLOCK_PASS when NODE is appended to nd_head. e.g. The locations of the NODE_BLOCK_PASS is fixed: ``` o[1, &bl] = :c ``` * Before ``` NODE_BLOCK_PASS (line: 1, first_lineno: 1, first_column: 2, last_lineno: 1, last_column: 8) ``` * After ``` NODE_BLOCK_PASS (line: 1, first_lineno: 1, first_column: 2, last_lineno: 1, last_column: 14) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y1
1 files changed, 1 insertions, 0 deletions
diff --git a/parse.y b/parse.y
index 3950382e2b..03b9ed992e 100644
--- a/parse.y
+++ b/parse.y
@@ -10058,6 +10058,7 @@ arg_append_gen(struct parser_params *parser, NODE *node1, NODE *node2, const YYL
return list_append(node1, node2, location);
case NODE_BLOCK_PASS:
node1->nd_head = arg_append(node1->nd_head, node2, location);
+ node1->nd_loc.last_loc = node1->nd_head->nd_loc.last_loc;
return node1;
case NODE_ARGSPUSH:
node1->nd_body = list_append(new_list(node1->nd_body, &node1->nd_body->nd_loc), node2, location);