зеркало из https://github.com/github/ruby.git
parse.y: move common code
* parse.y (arg, primary): move common code shared with ripper. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
6d877a9341
Коммит
418c46f284
6
parse.y
6
parse.y
|
@ -2285,11 +2285,10 @@ arg : lhs '=' arg
|
|||
}
|
||||
| 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
|
|||
}
|
||||
| keyword_defined opt_nl '(' {in_defined = 1;} expr rparen
|
||||
{
|
||||
/*%%%*/
|
||||
in_defined = 0;
|
||||
/*%%%*/
|
||||
$$ = new_defined($5);
|
||||
/*%
|
||||
in_defined = 0;
|
||||
$$ = dispatch1(defined, $5);
|
||||
%*/
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче