Skip to content
Permalink
Browse files
parse.y: use opt_paren_args to simplify yield rule
  • Loading branch information
matz committed Nov 27, 2016
1 parent 36fc1f1 commit 27ceb848180463e66e080d13c3a96b1e56dbddbd
Showing 1 changed file with 2 additions and 10 deletions.
@@ -2137,17 +2137,9 @@ primary : literal
{
$$ = new_return(p, 0);
}
| keyword_yield '(' call_args rparen
| keyword_yield opt_paren_args
{
$$ = new_yield(p, $3);
}
| keyword_yield '(' rparen
{
$$ = new_yield(p, 0);
}
| keyword_yield
{
$$ = new_yield(p, 0);
$$ = new_yield(p, $2);
}
| keyword_not '(' expr rparen
{

0 comments on commit 27ceb84

Please sign in to comment.