patch 8.2.0276: Vim9: not allowing space before ")" in function call
Problem: Vim9: not allowing space before ")" in function call is too
restrictive. (Ben Jackson)
Solution: Skip space before the ")". Adjust other space checks.
diff --git a/src/vim9compile.c b/src/vim9compile.c
index adfcbcc..8614943 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -1658,9 +1658,21 @@
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));