[ruby-cvs:67962] yui-knk:r60781 (trunk): parse.y: Fix location of asgn node

yui-knk at ruby-lang.org yui-knk at ruby-lang.org
Thu Nov 16 10:56:54 JST 2017


yui-knk	2017-11-16 10:56:54 +0900 (Thu, 16 Nov 2017)

  New Revision: 60781

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

  Log:
    parse.y: Fix location of asgn node
    
    * parse.y (new_op_assign_gen): Fix location of asgn node.
      Assignable node (e.g. NODE_LASGN) is generated before rhs
      is generated, so we reset the location when nd_value of
      asgn is fixed.
    
      e.g. :
    
      ```
      a -= 10
      ```
    
      * Before
    
      ```
      NODE_DASGN_CURR (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 1)
      ```
    
      * After
    
      ```
      NODE_DASGN_CURR (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 7)
      ```

  Modified files:
    trunk/parse.y


More information about the ruby-cvs mailing list