[ruby-cvs:70712] yui-knk:r63621 (trunk): parse.y: Fix locations of NODE_RESCUE

yui-knk at ruby-lang.org yui-knk at ruby-lang.org
Sun Jun 10 14:02:26 JST 2018


yui-knk	2018-06-10 14:02:26 +0900 (Sun, 10 Jun 2018)

  New Revision: 63621

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

  Log:
    parse.y: Fix locations of NODE_RESCUE
    
    * parse.y (new_bodystmt): Fix locations of NODE_RESCUE
      to end with nd_else or nd_resq. Before this commit,
      locations of NODE_RESCUE included locations of nd_ensr
      of NODE_ENSURE which is a parent node of NODE_RESCUE.
    
      e.g. The location of the end of NODE_RESCUE is fixed:
    
      ```
      def a
        :b
      rescue
        :c
      ensure
        :d
      end
      ```
    
      * Before
    
      ```
      NODE_RESCUE (line: 2, location: (2,2)-(6,4))
      ```
    
      * After
    
      ```
      NODE_RESCUE (line: 3, location: (2,2)-(5,0))
      ```

  Modified files:
    trunk/parse.y


More information about the ruby-cvs mailing list