[ruby-cvs:68867] yui-knk:r61686 (trunk): parse.y: Use nd_loc of head and tail

yui-knk at ruby-lang.org yui-knk at ruby-lang.org
Mon Jan 8 21:23:53 JST 2018


yui-knk	2018-01-08 21:23:53 +0900 (Mon, 08 Jan 2018)

  New Revision: 61686

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

  Log:
    parse.y: Use nd_loc of head and tail
    
    * parse.y (block_append_gen): Use nd_loc of
      head(tail) when create NEW_BLOCK of head(tail).
    
      e.g. The locations of the NODE_BLOCK is fixed:
    
      ```
      BEGIN {
        :a
      }
    
      BEGIN {
        :b
      }
      ```
    
      * Before
    
      ```
      NODE_BLOCK (line: 5, code_range: (5,0)-(7,1))
      ```
    
      * After
    
      ```
      NODE_BLOCK (line: 1, code_range: (1,0)-(7,1))
      ```

  Modified files:
    trunk/parse.y


More information about the ruby-cvs mailing list