[前][次][番号順一覧][スレッド一覧]

ruby-changes:49018

From: yui-knk <ko1@a...>
Date: Tue, 12 Dec 2017 10:14:02 +0900 (JST)
Subject: [ruby-changes:49018] yui-knk:r61133 (trunk): parse.y: Fix locations of NODE_ARRAY of mlhs_head

yui-knk	2017-12-12 10:13:56 +0900 (Tue, 12 Dec 2017)

  New Revision: 61133

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

  Log:
    parse.y: Fix locations of NODE_ARRAY of mlhs_head
    
    * parse.y: Fix to only include a range of mlhs_item
      (exclude ',' form range).
    
      e.g. The locations of the NODE_ARRAY is fixed:
    
      ```
      (a,) = 1,2
      ```
    
      * Before
    
      ```
      NODE_ARRAY (line: 1, code_range: (1,1)-(1,3))
      ```
    
      * After
    
      ```
      NODE_ARRAY (line: 1, code_range: (1,1)-(1,2))
      ```

  Modified files:
    trunk/parse.y
Index: parse.y
===================================================================
--- parse.y	(revision 61132)
+++ parse.y	(revision 61133)
@@ -1877,7 +1877,7 @@ mlhs_item	: mlhs_node https://github.com/ruby/ruby/blob/trunk/parse.y#L1877
 mlhs_head	: mlhs_item ','
 		    {
 		    /*%%%*/
-			$$ = new_list($1, &@$);
+			$$ = new_list($1, &@1);
 		    /*%
 			$$ = mlhs_add(mlhs_new(), $1);
 		    %*/

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]