aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y3
1 files changed, 3 insertions, 0 deletions
diff --git a/parse.y b/parse.y
index 33c1c89c3d..7247afafa3 100644
--- a/parse.y
+++ b/parse.y
@@ -188,6 +188,7 @@ numparam_id_p(ID id)
unsigned int idx = NUMPARAM_ID_TO_IDX(id);
return idx > 0 && idx <= NUMPARAM_MAX;
}
+static void numparam_name(struct parser_params *p, ID id);
#define DVARS_INHERIT ((void*)1)
#define DVARS_TOPSCOPE NULL
@@ -2981,6 +2982,7 @@ primary : literal
}
| k_def fname
{
+ numparam_name(p, get_id($2));
local_push(p, 0);
$<id>$ = p->cur_arg;
p->cur_arg = 0;
@@ -3007,6 +3009,7 @@ primary : literal
}
| k_def singleton dot_or_colon {SET_LEX_STATE(EXPR_FNAME);} fname
{
+ numparam_name(p, get_id($5));
$<num>4 = p->in_def;
p->in_def = 1;
SET_LEX_STATE(EXPR_ENDFN|EXPR_LABEL); /* force for args */