Project

General

Profile

« Previous | Next » 

Revision c0ffccf7

Added by yui-knk (Kaneko Yuichiro) over 7 years ago

parse.y: Fix the locations of NODE in percent strings

  • parse.y (parser_yylex): token_flush before
    calling parse_string. Without token_flush
    the first locations of NODE in percent strings
    are set to the location of %.

e.g. The locations of NODE_STR is fixed:

%w[a b]
  • Before
NODE_STR (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 4) ("a")
NODE_STR (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 6) ("b")
  • After
NODE_STR (line: 1, first_lineno: 1, first_column: 3, last_lineno: 1, last_column: 4) ("a")
NODE_STR (line: 1, first_lineno: 1, first_column: 5, last_lineno: 1, last_column: 6) ("b")

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