comparison src/userfunc.c @ 21263:71bd2f9adb61 v8.2.1182

patch 8.2.1182: Vim9: no check for whitespace after comma in lambda Commit: https://github.com/vim/vim/commit/914e7eaa67f8d816e15fb4a1180e6bece88d9742 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jul 11 15:20:48 2020 +0200 patch 8.2.1182: Vim9: no check for whitespace after comma in lambda Problem: Vim9: no check for whitespace after comma in lambda. Solution: Give error if white space is missing.
author Bram Moolenaar <Bram@vim.org>
date Sat, 11 Jul 2020 15:30:04 +0200
parents a4d00a2dadd6
children 8d1d11afd8c8
comparison
equal deleted inserted replaced
21262:f90a8e001d61 21263:71bd2f9adb61
264 mustend = TRUE; 264 mustend = TRUE;
265 } 265 }
266 else if (any_default) 266 else if (any_default)
267 { 267 {
268 emsg(_("E989: Non-default argument follows default argument")); 268 emsg(_("E989: Non-default argument follows default argument"));
269 mustend = TRUE; 269 goto err_ret;
270 } 270 }
271 if (*p == ',') 271 if (*p == ',')
272 {
272 ++p; 273 ++p;
274 // Don't give this error when skipping, it makes the "->" not
275 // found in "{k,v -> x}" and give a confusing error.
276 if (!skip && in_vim9script()
277 && !IS_WHITE_OR_NUL(*p) && *p != endchar)
278 {
279 semsg(_(e_white_after), ",");
280 goto err_ret;
281 }
282 }
273 else 283 else
274 mustend = TRUE; 284 mustend = TRUE;
275 } 285 }
276 whitep = p; 286 whitep = p;
277 p = skipwhite(p); 287 p = skipwhite(p);