[ruby-cvs:68167] yui-knk:r60986 (trunk): parse.y: Fix locations of NODEs generated by cond0

yui-knk at ruby-lang.org yui-knk at ruby-lang.org
Sun Dec 3 13:53:05 JST 2017


yui-knk	2017-12-03 13:53:05 +0900 (Sun, 03 Dec 2017)

  New Revision: 60986

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

  Log:
    parse.y: Fix locations of NODEs generated by cond0
    
    * parse.y: Fix to only include a range of the first argument of cond.
    
      e.g. The locations of the NODE_MATCH2 and NODE_GVAR are fixed:
    
      ```
      1 while /#{:a}/
      ```
    
      * Before
    
      ```
      NODE_MATCH2 (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 15)
      NODE_GVAR (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 15)
      ```
    
      * After
    
      ```
      NODE_MATCH2 (line: 1, first_lineno: 1, first_column: 8, last_lineno: 1, last_column: 15)
      NODE_GVAR (line: 1, first_lineno: 1, first_column: 8, last_lineno: 1, last_column: 15)
      ```

  Modified files:
    trunk/parse.y


More information about the ruby-cvs mailing list