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

yui-knk at ruby-lang.org yui-knk at ruby-lang.org
Fri Nov 17 13:25:49 JST 2017


yui-knk	2017-11-17 13:25:48 +0900 (Fri, 17 Nov 2017)

  New Revision: 60816

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

  Log:
    Fix location of assignable nodes
    
    * parse.y (node_assign_gen): In some case assignable nodes
      are created before rhs is created. In this case it is
      needed to set location after rhs is shifted to
      rhs range be included to assignable nodes.
    
      e.g. The locations of NODE_DASGN_CURR is fixed:
    
      ```
      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: 6)
      ```

  Modified files:
    trunk/parse.y


More information about the ruby-cvs mailing list