[ruby-cvs:68848] mame:r61667 (trunk): parse.y: set bison's first_loc.lineno to nd_line by default

mame at ruby-lang.org mame at ruby-lang.org
Mon Jan 8 10:49:00 JST 2018


mame	2018-01-08 10:49:00 +0900 (Mon, 08 Jan 2018)

  New Revision: 61667

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

  Log:
    parse.y: set bison's first_loc.lineno to nd_line by default
    
    This change initializes nd_line, lineno of each node, by default, by
    using the first line number of code range that bison tracks, instead of
    extracting from lexer state.
    The lexer state basically provides only the last line number of code
    range, so many hacks are used to approximate the first line number.  The
    hacks have been introduced on demand, or very ad-hocly.  I think this
    change will make it possible to remove most of the hacks.

  Modified files:
    trunk/parse.y


More information about the ruby-cvs mailing list