diff options
author | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-04 07:50:42 +0000 |
---|---|---|
committer | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-04 07:50:42 +0000 |
commit | 81d8c29a211516023f91839070f52d745bb15fe2 (patch) | |
tree | c489231850742b6b300a6bb28093ad37e15f8a9c /parse.y | |
parent | 340fe20a3be042ea416442c137b4652acfb37a5d (diff) | |
download | ruby-81d8c29a211516023f91839070f52d745bb15fe2.tar.gz |
parse.y: Fix a location of NODE_ARGSCAT
* parse.y (arg_append_gen): Update the last location of
NODE_ARGSCAT when NODE is appended to nd_body.
e.g. The locations of the NODE_ARGSCAT is fixed:
```
m(*a, :b, :c)
```
* Before
```
NODE_ARGSCAT (line: 1, first_lineno: 1, first_column: 2, last_lineno: 1, last_column: 8)
```
* After
```
NODE_ARGSCAT (line: 1, first_lineno: 1, first_column: 2, last_lineno: 1, last_column: 12)
```
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -10061,6 +10061,7 @@ arg_append_gen(struct parser_params *parser, NODE *node1, NODE *node2, const YYL return node1; case NODE_ARGSPUSH: node1->nd_body = list_append(new_list(node1->nd_body, &node1->nd_body->nd_loc), node2, location); + node1->nd_loc.last_loc = node1->nd_body->nd_loc.last_loc; nd_set_type(node1, NODE_ARGSCAT); return node1; } |