aboutsummaryrefslogtreecommitdiffstats
path: root/awkgram.y
diff options
context:
space:
mode:
Diffstat (limited to 'awkgram.y')
-rw-r--r--awkgram.y8
1 files changed, 7 insertions, 1 deletions
diff --git a/awkgram.y b/awkgram.y
index 281d0ef8..c427a5b7 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -1094,7 +1094,7 @@ non_compound_stmt
{
if (! in_function)
yyerror(_("`return' used outside function context"));
- } opt_exp statement_term {
+ } opt_fcall_exp statement_term {
if (called_from_eval)
$1->opcode = Op_K_return_from_eval;
@@ -1614,6 +1614,12 @@ fcall_exp
| typed_regexp { $$ = list_create($1); }
;
+opt_fcall_exp
+ : /* empty */
+ { $$ = NULL; }
+ | fcall_exp { $$ = $1; }
+ ;
+
/* Expressions, not including the comma operator. */
exp
: variable assign_operator exp %prec ASSIGNOP