From 473aea5636154e605c7459c4a28932eca399846c Mon Sep 17 00:00:00 2001 From: yui-knk Date: Tue, 9 Jan 2018 00:19:51 +0000 Subject: [PATCH] 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- parse.y | 3 --- 1 file changed, 3 deletions(-) diff --git a/parse.y b/parse.y index ab2c3c1d89..a690ed4530 100644 --- a/parse.y +++ b/parse.y @@ -2787,7 +2787,6 @@ primary : literal { /*%%%*/ $$ = NEW_CASE2($3, &@$); - nd_set_line($$, @1.first_loc.lineno); /*% $$ = dispatch2(case, Qnil, $3); %*/ @@ -2935,7 +2934,6 @@ primary : literal $$ = 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 $$ = 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, $3, $5, $7, $8); %*/