[ruby-cvs:68002] yui-knk:r60821 (trunk): Fix location of assignable nodes

yui-knk at ruby-lang.org yui-knk at ruby-lang.org
Fri Nov 17 16:39:15 JST 2017


yui-knk	2017-11-17 16:39:15 +0900 (Fri, 17 Nov 2017)

  New Revision: 60821

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

  Log:
    Fix location of assignable nodes
    
    * parse.y (node_assign_gen): NODE_ATTRASGN is created
      before rhs is created. It is needed to set location
      after rhs is created to rhs range be included to the
      location of NODE_ATTRASGN.
    
      e.g. The locations of NODE_ATTRASGN is fixed:
    
      ```
      a[1] = 2
      ```
    
      * Before
    
      ```
      NODE_ATTRASGN (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 4)
      ```
    
      * After
    
      ```
      NODE_ATTRASGN (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 8)
      ```

  Modified files:
    trunk/parse.y


More information about the ruby-cvs mailing list