diff options
author | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-18 13:11:36 +0000 |
---|---|---|
committer | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-18 13:11:36 +0000 |
commit | 5fd6558502b30e1450023b73a7bbbd8f419767c7 (patch) | |
tree | c6ca37f1eeb955bfd6ddb31b23863770813c7231 /parse.y | |
parent | fb826d58ee187ac754d67fc048eef09e8c97171a (diff) | |
download | ruby-5fd6558502b30e1450023b73a7bbbd8f419767c7.tar.gz |
parse.y: Fix the locations of NODE_ITER
* parse.y: Update the locations of NODE_ITER
when nd_iter is determined.
e.g. The locations of NODE_ITER is fixed:
```
a {b}
```
* Before
```
NODE_ITER (line: 1, first_lineno: 1, first_column: 2, last_lineno: 1, last_column: 5)
```
* After
```
NODE_ITER (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 5)
```
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -2788,6 +2788,7 @@ primary : literal { /*%%%*/ $2->nd_iter = $1; + $2->nd_loc = @$; $$ = $2; /*% $$ = method_arg(dispatch1(fcall, $1), arg_new()); @@ -2800,6 +2801,7 @@ primary : literal /*%%%*/ block_dup_check($1->nd_args, $2); $2->nd_iter = $1; + $2->nd_loc = @$; $$ = $2; /*% $$ = method_add_block($1, $2); @@ -3624,6 +3626,7 @@ block_call : command do_block block_dup_check($1->nd_args, $2); } $2->nd_iter = $1; + $2->nd_loc = @$; $$ = $2; fixpos($$, $1); /*% @@ -3639,6 +3642,7 @@ block_call : command do_block /*%%%*/ block_dup_check($4, $5); $5->nd_iter = new_command_qcall($2, $1, $3, $4, &@$); + $5->nd_loc = @$; $$ = $5; fixpos($$, $1); /*% @@ -3651,6 +3655,7 @@ block_call : command do_block /*%%%*/ block_dup_check($4, $5); $5->nd_iter = new_command_qcall($2, $1, $3, $4, &@$); + $5->nd_loc = @$; $$ = $5; fixpos($$, $1); /*% |