diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-30 23:43:13 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-30 23:43:13 +0000 |
commit | a769027f7962499e16f925e5ea8c3faed712af3d (patch) | |
tree | 2097d277931204b430fc2358ab6bdcc85ebe8ef8 /parse.y | |
parent | a4cfd15a739aca00fa55156e1867e98a9ed86ef6 (diff) |
parse.y: last location from bison
* parse.y (command): set the last location from the location
managed by bison, so that other nodes are not needed.
[ruby-core:89648] [Bug #15271]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1351,7 +1351,7 @@ command : fcall command_args %prec tLOWEST { /*%%%*/ $1->nd_args = $2; - nd_set_last_loc($1, nd_last_loc($2)); + nd_set_last_loc($1, @2.end_pos); $$ = $1; /*% %*/ /*% ripper: command!($1, $2) %*/ @@ -1363,7 +1363,7 @@ command : fcall command_args %prec tLOWEST $1->nd_args = $2; $$ = method_add_block(p, $1, $3, &@$); fixpos($$, $1); - nd_set_last_loc($1, nd_last_loc($2)); + nd_set_last_loc($1, @2.end_pos); /*% %*/ /*% ripper: method_add_block!(command!($1, $2), $3) %*/ } |