ruby-changes:49055
From: yui-knk <ko1@a...>
Date: Tue, 12 Dec 2017 23:21:24 +0900 (JST)
Subject: [ruby-changes:49055] yui-knk:r61170 (trunk): parse.y: Set locations of nd_body in NODE_ITER explicitly
yui-knk 2017-12-12 23:21:20 +0900 (Tue, 12 Dec 2017) New Revision: 61170 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61170 Log: parse.y: Set locations of nd_body in NODE_ITER explicitly * parse.y: Same as r61168, but for brace_block. Modified files: trunk/parse.y Index: parse.y =================================================================== --- parse.y (revision 61169) +++ parse.y (revision 61170) @@ -1645,6 +1645,8 @@ cmd_brace_block : tLBRACE_ARG https://github.com/ruby/ruby/blob/trunk/parse.y#L1645 { $$ = $3; /*%%%*/ + $3->nd_body->nd_loc.first_loc = @1.first_loc; + $3->nd_body->nd_loc.last_loc = @4.last_loc; nd_set_line($$, $<num>2); /*% %*/ } @@ -3805,6 +3807,8 @@ brace_block : '{' https://github.com/ruby/ruby/blob/trunk/parse.y#L3807 { $$ = $3; /*%%%*/ + $3->nd_body->nd_loc.first_loc = @1.first_loc; + $3->nd_body->nd_loc.last_loc = @4.last_loc; nd_set_line($$, $<num>2); /*% %*/ } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/