[ruby-cvs:68251] yui-knk:r61070 (trunk): parse.y: Fix locations of array

yui-knk at ruby-lang.org yui-knk at ruby-lang.org
Thu Dec 7 15:38:49 JST 2017


yui-knk	2017-12-07 15:38:49 +0900 (Thu, 07 Dec 2017)

  New Revision: 61070

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

  Log:
    parse.y: Fix locations of array
    
    * parse.y (make_array): Set locations of ary to
      include locations of start token (tLBRACK, tWORDS_BEG, ...)
      and end token (']', tSTRING_END, ...) of array.
    
      e.g. The locations of the NODE_ARRAY is fixed:
    
      ```
      [1, 2, 3]
      ```
    
      * Before
    
      ```
      NODE_ARRAY (line: 1, code_range: (1,1)-(1,8))
      ```
    
      * After
    
      ```
      NODE_ARRAY (line: 1, code_range: (1,0)-(1,9))
      ```

  Modified files:
    trunk/parse.y


More information about the ruby-cvs mailing list