Mercurial > vim
comparison src/vim9compile.c @ 19437:5d34ae66118e v8.2.0276
patch 8.2.0276: Vim9: not allowing space before ")" in function call
Commit: https://github.com/vim/vim/commit/38a5f517a70d7b76361152d2898d7f826c5b2491
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Feb 19 12:40:39 2020 +0100
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 19 Feb 2020 12:45:04 +0100 |
parents | f3e8e74cb747 |
children | b26e96f7c12f |
comparison
equal
deleted
inserted
replaced
19436:d44f610825c1 | 19437:5d34ae66118e |
---|---|
1656 while (*p != NUL && *p != ')') | 1656 while (*p != NUL && *p != ')') |
1657 { | 1657 { |
1658 if (compile_expr1(&p, cctx) == FAIL) | 1658 if (compile_expr1(&p, cctx) == FAIL) |
1659 return FAIL; | 1659 return FAIL; |
1660 ++*argcount; | 1660 ++*argcount; |
1661 | |
1662 if (*p != ',' && *skipwhite(p) == ',') | |
1663 { | |
1664 emsg(_("E1068: No white space allowed before ,")); | |
1665 p = skipwhite(p); | |
1666 } | |
1661 if (*p == ',') | 1667 if (*p == ',') |
1662 p = skipwhite(p + 1); | 1668 { |
1663 } | 1669 ++p; |
1670 if (!VIM_ISWHITE(*p)) | |
1671 emsg(_("E1069: white space required after ,")); | |
1672 } | |
1673 p = skipwhite(p); | |
1674 } | |
1675 p = skipwhite(p); | |
1664 if (*p != ')') | 1676 if (*p != ')') |
1665 { | 1677 { |
1666 emsg(_(e_missing_close)); | 1678 emsg(_(e_missing_close)); |
1667 return FAIL; | 1679 return FAIL; |
1668 } | 1680 } |