diff options
author | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-12 08:54:34 +0000 |
---|---|---|
committer | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-12 08:54:34 +0000 |
commit | 79c2e6eccf9ba1d3197d179351761104baadfa63 (patch) | |
tree | 6a8f770d13bd722dc21e67e8339ebd9ed1cfd611 /parse.y | |
parent | a6a1d7ab21338f48ca42b4ad4d1c1d1fd6ed3a38 (diff) |
parse.y: Fix the locations of NODE_ITER (cmd_brace_block)
* parse.y: Update the locations of NODE_ITER
when nd_iter is determined.
```
a (1) {|i|}
```
* Before
```
NODE_ITER (line: 1, code_range: (1,6)-(1,10))
```
* After
```
NODE_ITER (line: 1, code_range: (1,0)-(1,11))
```
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -1678,6 +1678,7 @@ command : fcall command_args %prec tLOWEST $$ = method_add_block($$, $3); fixpos($$, $1); /*%%%*/ + $$->nd_loc = @$; nd_set_last_lineno($1, nd_last_lineno($2)); nd_set_last_column($1, nd_last_column($2)); /*% @@ -1694,6 +1695,10 @@ command : fcall command_args %prec tLOWEST $$ = new_command_qcall($2, $1, $3, $4, &@$); $$ = method_add_block($$, $5); fixpos($$, $1); + /*%%%*/ + $$->nd_loc = @$; + /*% + %*/ } | primary_value tCOLON2 operation2 command_args %prec tLOWEST { @@ -1706,6 +1711,10 @@ command : fcall command_args %prec tLOWEST $$ = new_command_qcall(ID2VAL(idCOLON2), $1, $3, $4, &@$); $$ = method_add_block($$, $5); fixpos($$, $1); + /*%%%*/ + $$->nd_loc = @$; + /*% + %*/ } | keyword_super command_args { |