Remove unnecessary semantic actions
If you don’t specify an action for a rule, Lrama supplies a default: `$$ = $1`.
This commit is contained in:
parent
76759003f5
commit
18f756e4af
15
parse.y
15
parse.y
@ -3190,9 +3190,6 @@ stmts : none
|
|||||||
;
|
;
|
||||||
|
|
||||||
stmt_or_begin : stmt
|
stmt_or_begin : stmt
|
||||||
{
|
|
||||||
$$ = $1;
|
|
||||||
}
|
|
||||||
| keyword_BEGIN
|
| keyword_BEGIN
|
||||||
{
|
{
|
||||||
yyerror1(&@1, "BEGIN is permitted only at toplevel");
|
yyerror1(&@1, "BEGIN is permitted only at toplevel");
|
||||||
@ -4034,9 +4031,6 @@ arg : asgn(lhs, arg_rhs)
|
|||||||
}
|
}
|
||||||
| def_endless_method(endless_arg)
|
| def_endless_method(endless_arg)
|
||||||
| primary
|
| primary
|
||||||
{
|
|
||||||
$$ = $1;
|
|
||||||
}
|
|
||||||
;
|
;
|
||||||
|
|
||||||
endless_arg : arg %prec modifier_rescue
|
endless_arg : arg %prec modifier_rescue
|
||||||
@ -4097,9 +4091,6 @@ arg_value : value_expr(arg)
|
|||||||
|
|
||||||
aref_args : none
|
aref_args : none
|
||||||
| args trailer
|
| args trailer
|
||||||
{
|
|
||||||
$$ = $1;
|
|
||||||
}
|
|
||||||
| args ',' assocs trailer
|
| args ',' assocs trailer
|
||||||
{
|
{
|
||||||
$$ = $3 ? arg_append(p, $1, new_hash(p, $3, &@3), &@$) : $1;
|
$$ = $3 ? arg_append(p, $1, new_hash(p, $3, &@3), &@$) : $1;
|
||||||
@ -4163,9 +4154,6 @@ opt_paren_args : none
|
|||||||
opt_call_args : none
|
opt_call_args : none
|
||||||
| call_args
|
| call_args
|
||||||
| args ','
|
| args ','
|
||||||
{
|
|
||||||
$$ = $1;
|
|
||||||
}
|
|
||||||
| args ',' assocs ','
|
| args ',' assocs ','
|
||||||
{
|
{
|
||||||
$$ = $3 ? arg_append(p, $1, new_hash(p, $3, &@3), &@$) : $1;
|
$$ = $3 ? arg_append(p, $1, new_hash(p, $3, &@3), &@$) : $1;
|
||||||
@ -5632,9 +5620,6 @@ p_args : p_expr
|
|||||||
;
|
;
|
||||||
|
|
||||||
p_args_head : p_arg ','
|
p_args_head : p_arg ','
|
||||||
{
|
|
||||||
$$ = $1;
|
|
||||||
}
|
|
||||||
| p_args_head p_arg ','
|
| p_args_head p_arg ','
|
||||||
{
|
{
|
||||||
$$ = list_concat($1, $2);
|
$$ = list_concat($1, $2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user