Remove redundant RETURN statement rule.

The same effect can be achieved with one rule using opt_expr.
This commit is contained in:
Bill Currie 2010-12-30 16:05:50 +09:00
parent 58042719e5
commit f738ef5dba

View file

@ -797,14 +797,10 @@ statements
statement
: ';' { $$ = 0; }
| statement_block { $$ = $1; }
| RETURN fexpr ';'
| RETURN opt_expr ';'
{
$$ = return_expr (current_func, $2);
}
| RETURN ';'
{
$$ = return_expr (current_func, 0);
}
| BREAK ';'
{
$$ = 0;