ruby-changes:34847
From: nobu <ko1@a...>
Date: Fri, 25 Jul 2014 00:28:16 +0900 (JST)
Subject: [ruby-changes:34847] nobu:r46930 (trunk): parse.y: move common code
nobu 2014-07-25 00:28:01 +0900 (Fri, 25 Jul 2014) New Revision: 46930 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=46930 Log: parse.y: move common code * parse.y (arg, primary): move common code shared with ripper. Modified files: trunk/parse.y Index: parse.y =================================================================== --- parse.y (revision 46929) +++ parse.y (revision 46930) @@ -2285,11 +2285,10 @@ arg : lhs '=' arg https://github.com/ruby/ruby/blob/trunk/parse.y#L2285 } | keyword_defined opt_nl {in_defined = 1;} arg { - /*%%%*/ in_defined = 0; + /*%%%*/ $$ = new_defined($4); /*% - in_defined = 0; $$ = dispatch1(defined, $4); %*/ } @@ -2695,11 +2694,10 @@ primary : literal https://github.com/ruby/ruby/blob/trunk/parse.y#L2694 } | keyword_defined opt_nl '(' {in_defined = 1;} expr rparen { - /*%%%*/ in_defined = 0; + /*%%%*/ $$ = new_defined($5); /*% - in_defined = 0; $$ = dispatch1(defined, $5); %*/ } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/