summaryrefslogtreecommitdiff
path: root/src/vim9compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vim9compile.c')
-rw-r--r--src/vim9compile.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 0db516274..1edf48ce6 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -2290,6 +2290,7 @@ compile_arguments(char_u **arg, cctx_T *cctx, int *argcount)
{
char_u *p = *arg;
char_u *whitep = *arg;
+ int must_end = FALSE;
for (;;)
{
@@ -2300,6 +2301,11 @@ compile_arguments(char_u **arg, cctx_T *cctx, int *argcount)
*arg = p + 1;
return OK;
}
+ if (must_end)
+ {
+ semsg(_(e_missing_comma_before_argument_str), p);
+ return FAIL;
+ }
if (compile_expr0(&p, cctx) == FAIL)
return FAIL;
@@ -2316,6 +2322,8 @@ compile_arguments(char_u **arg, cctx_T *cctx, int *argcount)
if (*p != NUL && !VIM_ISWHITE(*p))
semsg(_(e_white_space_required_after_str), ",");
}
+ else
+ must_end = TRUE;
whitep = p;
p = skipwhite(p);
}