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

ruby-changes:49582

From: yui-knk <ko1@a...>
Date: Tue, 9 Jan 2018 09:20:02 +0900 (JST)
Subject: [ruby-changes:49582] yui-knk:r61697 (trunk): parse.y: Remove duplicated nd_line set

yui-knk	2018-01-09 09:19:51 +0900 (Tue, 09 Jan 2018)

  New Revision: 61697

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

  Log:
    parse.y: Remove duplicated nd_line set
    
    * parse.y: These nodes are created with `@$` locations.
      Start position of `@$` is same as start position of `@1`.
      And NEW_XXX macros set first_loc.lineno of a passed
      code range to nd_line. So these nd_set_line are not needed.

  Modified files:
    trunk/parse.y
Index: parse.y
===================================================================
--- parse.y	(revision 61696)
+++ parse.y	(revision 61697)
@@ -2787,7 +2787,6 @@ primary		: literal https://github.com/ruby/ruby/blob/trunk/parse.y#L2787
 		    {
 		    /*%%%*/
 			$$ = NEW_CASE2($3, &@$);
-			nd_set_line($$, @1.first_loc.lineno);
 		    /*%
 			$$ = dispatch2(case, Qnil, $3);
 		    %*/
@@ -2935,7 +2934,6 @@ primary		: literal https://github.com/ruby/ruby/blob/trunk/parse.y#L2934
 			$$ = NEW_DEFN($2, $5, body, &@$);
 			nd_set_line($$->nd_defn, @7.last_loc.lineno);
 			set_line_body(body, @1.first_loc.lineno);
-			nd_set_line($$, @1.first_loc.lineno);
 		    /*%
 			$$ = dispatch3(def, $2, $5, $6);
 		    %*/
@@ -2962,7 +2960,6 @@ primary		: literal https://github.com/ruby/ruby/blob/trunk/parse.y#L2960
 			$$ = NEW_DEFS($2, $5, $7, body, &@$);
 			nd_set_line($$->nd_defn, @9.last_loc.lineno);
 			set_line_body(body, @1.first_loc.lineno);
-			nd_set_line($$, @1.first_loc.lineno);
 		    /*%
 			$$ = dispatch5(defs, $2, $<val>3, $5, $7, $8);
 		    %*/

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

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