comparison src/vim9type.c @ 23877:85cf06ddb2a8 v8.2.2480

patch 8.2.2480: Vim9: some errors for white space do not show context Commit: https://github.com/vim/vim/commit/c3fc75db023f2acd0b82b7eebffd7ed89e8001ed Author: Bram Moolenaar <Bram@vim.org> Date: Sun Feb 7 15:28:09 2021 +0100 patch 8.2.2480: Vim9: some errors for white space do not show context Problem: Vim9: some errors for white space do not show context. Solution: Include the text at the error.
author Bram Moolenaar <Bram@vim.org>
date Sun, 07 Feb 2021 15:30:03 +0100
parents e3720756acdc
children d95403445b6b
comparison
equal deleted inserted replaced
23876:50f3627e6740 23877:85cf06ddb2a8
786 { 786 {
787 ++p; 787 ++p;
788 if (!VIM_ISWHITE(*p)) 788 if (!VIM_ISWHITE(*p))
789 { 789 {
790 if (give_error) 790 if (give_error)
791 semsg(_(e_white_space_required_after_str), ","); 791 semsg(_(e_white_space_required_after_str_str),
792 ",", p - 1);
792 return NULL; 793 return NULL;
793 } 794 }
794 } 795 }
795 p = skipwhite(p); 796 p = skipwhite(p);
796 if (argcount == MAX_FUNC_ARGS) 797 if (argcount == MAX_FUNC_ARGS)
813 if (**arg == ':') 814 if (**arg == ':')
814 { 815 {
815 // parse return type 816 // parse return type
816 ++*arg; 817 ++*arg;
817 if (!VIM_ISWHITE(**arg) && give_error) 818 if (!VIM_ISWHITE(**arg) && give_error)
818 semsg(_(e_white_space_required_after_str), ":"); 819 semsg(_(e_white_space_required_after_str_str),
820 ":", *arg - 1);
819 *arg = skipwhite(*arg); 821 *arg = skipwhite(*arg);
820 ret_type = parse_type(arg, type_gap, give_error); 822 ret_type = parse_type(arg, type_gap, give_error);
821 if (ret_type == NULL) 823 if (ret_type == NULL)
822 return NULL; 824 return NULL;
823 } 825 }