Project

General

Profile

« Previous | Next » 

Revision f6a1ad41

Added by yui-knk (Kaneko Yuichiro) almost 8 years ago

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)) 

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e