[ruby-cvs:68352] yui-knk:r61171 (trunk): parse.y: Change the last location of none

yui-knk at ruby-lang.org yui-knk at ruby-lang.org
Tue Dec 12 23:47:34 JST 2017


yui-knk	2017-12-12 23:47:34 +0900 (Tue, 12 Dec 2017)

  New Revision: 61171

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

  Log:
    parse.y: Change the last location of none
    
    * parse.y: Change the last location of none to be
      equal to the first location of none.
      Sometimes none has length (`parser->tokp` does not
      match `lex_p` when none is generated).
      This leads to invalid code_ranges.
    
      e.g. The locations of the NODE_CALL (:sort) is fixed:
    
      ```
      x.sort.join(" ")
      ```
    
      * Before
    
      ```
      NODE_CALL (line: 1, code_range: (1,0)-(1,7))
      ```
    
      * After
    
      ```
      NODE_CALL (line: 1, code_range: (1,0)-(1,6))
      ```

  Modified files:
    trunk/parse.y


More information about the ruby-cvs mailing list