summaryrefslogtreecommitdiff
path: root/src/vim9compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vim9compile.c')
-rw-r--r--src/vim9compile.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/vim9compile.c b/src/vim9compile.c
index adfcbcc8f..8614943fd 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -1658,9 +1658,21 @@ compile_arguments(char_u **arg, cctx_T *cctx, int *argcount)
if (compile_expr1(&p, cctx) == FAIL)
return FAIL;
++*argcount;
+
+ if (*p != ',' && *skipwhite(p) == ',')
+ {
+ emsg(_("E1068: No white space allowed before ,"));
+ p = skipwhite(p);
+ }
if (*p == ',')
- p = skipwhite(p + 1);
+ {
+ ++p;
+ if (!VIM_ISWHITE(*p))
+ emsg(_("E1069: white space required after ,"));
+ }
+ p = skipwhite(p);
}
+ p = skipwhite(p);
if (*p != ')')
{
emsg(_(e_missing_close));