diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-21 06:52:15 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-21 06:52:15 +0000 |
commit | c2f10299ac49e0cd6cae3578f56146f7c5e8702b (patch) | |
tree | 428e3f59d8e384c74e09a1759ebfd6363c73f53c /parse.y | |
parent | e9a184ed63e7bdc121b482b7c08bcca670343821 (diff) | |
download | ruby-c2f10299ac49e0cd6cae3578f56146f7c5e8702b.tar.gz |
parse.y: change NODE_SCOPE's nd_loc to one of the parent NODE
This change (ad-hocly) adjusts the code range of NODE_SCOPE in
class/module definition because the same adjust is already done in
method definition. I intend to just remove inconsistency between
class/module definition and method definition, but this kind of adjust
is dirty, so it should be fixed later (maybe in 2.6).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -2997,7 +2997,7 @@ primary : literal { /*%%%*/ $$ = NEW_CLASS($2, $5, $3); - $$->nd_body->nd_loc = @5; + $$->nd_body->nd_loc = @$; set_line_body($5, $<num>4); nd_set_line($$, $<num>4); $$->nd_loc = @$; @@ -3020,7 +3020,7 @@ primary : literal { /*%%%*/ $$ = NEW_SCLASS($3, $6); - $$->nd_body->nd_loc = @6; + $$->nd_body->nd_loc = @$; set_line_body($6, nd_line($3)); fixpos($$, $3); $$->nd_loc = @$; @@ -3048,7 +3048,7 @@ primary : literal { /*%%%*/ $$ = NEW_MODULE($2, $4); - $$->nd_body->nd_loc = @4; + $$->nd_body->nd_loc = @$; set_line_body($4, $<num>3); nd_set_line($$, $<num>3); $$->nd_loc = @$; |