[ruby-cvs:68146] yui-knk:r60965 (trunk): parse.y: Fix locations of NODEs related to for statement

yui-knk at ruby-lang.org yui-knk at ruby-lang.org
Fri Dec 1 22:40:03 JST 2017


yui-knk	2017-12-01 22:40:03 +0900 (Fri, 01 Dec 2017)

  New Revision: 60965

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

  Log:
    parse.y: Fix locations of NODEs related to for statement
    
    * parse.y: Fix to only include a range of for_var.
    
      e.g. The locations of the NODE_ARGS and NODE_DVAR are fixed:
    
      ```
      for a in m do n end
      ```
    
      * Before
    
      ```
      NODE_ARGS (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 19)
      NODE_DVAR (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 19)
      ```
    
      * After
    
      ```
      NODE_ARGS (line: 1, first_lineno: 1, first_column: 4, last_lineno: 1, last_column: 5)
      NODE_DVAR (line: 1, first_lineno: 1, first_column: 4, last_lineno: 1, last_column: 5)
      ```

  Modified files:
    trunk/parse.y


More information about the ruby-cvs mailing list