[ruby-cvs:68866] yui-knk:r61685 (trunk): parse.y: Fix the lineno of nd_set_line

yui-knk at ruby-lang.org yui-knk at ruby-lang.org
Mon Jan 8 20:50:35 JST 2018


yui-knk	2018-01-08 20:50:35 +0900 (Mon, 08 Jan 2018)

  New Revision: 61685

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61685

  Log:
    parse.y: Fix the lineno of nd_set_line
    
    * parse.y: Follow up of r61676. r61676 removed
      ruby_sourceline from some actions. When stop to
      use lineno of "n th" symbol, it's better to
      use last location's lineno of "n-1 th" symbol.
    
      e.g.
    
      ```
      primary : k_begin {} bodystmt k_end
      ```
    
      Before r61676 we use lineno of `@2` (ruby_sourceline).
      In this case, last location's lineno of `k_begin` (`@1`)
      is suitable.

  Modified files:
    trunk/parse.y


More information about the ruby-cvs mailing list