diff options
author | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-09 03:52:59 +0000 |
---|---|---|
committer | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-09 03:52:59 +0000 |
commit | 7a79d88161009dcdadc12d61c66037e7ef0864a0 (patch) | |
tree | 8a94fcbab62ca05feb131d0452339438f758fa5b /parse.y | |
parent | dceb897e5ab55468767c308af7680108cb0e482c (diff) |
parse.y: Fix locations of NODE_SCOPE in NODE_SCLASS
* parse.y: Fix to only include a range of bodystmt.
e.g. The locations of the NODE_SCOPE is fixed:
```
class << []
def m; end
end
```
* Before
```
NODE_SCOPE (line: 3, code_range: (1,0)-(3,3))
```
* After
```
NODE_SCOPE (line: 3, code_range: (2,2)-(3,3))
```
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2996,7 +2996,7 @@ primary : literal { /*%%%*/ $$ = NEW_SCLASS($3, $6); - $$->nd_body->nd_loc = @$; + $$->nd_body->nd_loc = @6; set_line_body($6, nd_line($3)); fixpos($$, $3); $$->nd_loc = @$; |