summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authoryui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-09 00:19:51 +0000
committeryui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-09 00:19:51 +0000
commit473aea5636154e605c7459c4a28932eca399846c (patch)
treee4808342f641a2b8ea0f4bb92648b70c8b6240b1 /parse.y
parentc434b4aba7bfef2405c4d1879bcc4cb9aff21a08 (diff)
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
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y3
1 files changed, 0 insertions, 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, $<val>3, $5, $7, $8);
%*/