diff options
author | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-09 03:03:34 +0000 |
---|---|---|
committer | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-09 03:03:34 +0000 |
commit | 79aba225b2ea4a54f3c52e0b4bb66083164343c7 (patch) | |
tree | c98aec6588ec9be2a7f21838f4ea68165533206b /parse.y | |
parent | 80e852d8a1410cfdbbbf39270181644b9f8e3d04 (diff) |
parse.y: Fix locations of NODE_SCOPE in NODE_CLASS
* parse.y: Fix to only include a range of bodystmt.
e.g. The locations of the NODE_SCOPE is fixed:
```
class A
def a; end
end
```
* Before
```
NODE_SCOPE (line: 3, code_range: (1,0)-(3,3))
```
* After
```
NODE_SCOPE (line: 3, code_range: (1,7)-(3,3))
```
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2973,7 +2973,7 @@ primary : literal { /*%%%*/ $$ = NEW_CLASS($2, $5, $3); - $$->nd_body->nd_loc = @$; + $$->nd_body->nd_loc = @5; set_line_body($5, $<num>4); nd_set_line($$, $<num>4); $$->nd_loc = @$; |