comparison src/eval.c @ 29619:842690841d50 v9.0.0150

patch 9.0.0150: error for using #{ in an expression is a bit confusing Commit: https://github.com/vim/vim/commit/25f40af9d2f04d18c8a276249f2794e83aa5c290 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Aug 6 11:35:28 2022 +0100 patch 9.0.0150: error for using #{ in an expression is a bit confusing Problem: Error for using #{ in an expression is a bit confusing. Solution: Mention that this error is only given for an expression. Avoid giving the error more than once. (closes #10855)
author Bram Moolenaar <Bram@vim.org>
date Sat, 06 Aug 2022 12:45:03 +0200
parents 949e8978ea43
children 9d54c8e6c682
comparison
equal deleted inserted replaced
29618:ad8fa115e062 29619:842690841d50
2155 2155
2156 if (nl == NULL) 2156 if (nl == NULL)
2157 break; 2157 break;
2158 p = nl; 2158 p = nl;
2159 } 2159 }
2160 else if (vim9_bad_comment(p))
2161 break;
2160 if (*p != NL) 2162 if (*p != NL)
2161 break; 2163 break;
2162 ++p; // skip another NL 2164 ++p; // skip another NL
2163 } 2165 }
2164 return p; 2166 return p;
2180 2182
2181 if (next == NULL) 2183 if (next == NULL)
2182 break; 2184 break;
2183 p = skipwhite(next); 2185 p = skipwhite(next);
2184 if (*p != NUL && !vim9_comment_start(p)) 2186 if (*p != NUL && !vim9_comment_start(p))
2187 {
2188 (void)vim9_bad_comment(p);
2185 return next; 2189 return next;
2190 }
2186 if (eval_next_line(NULL, evalarg) == NULL) 2191 if (eval_next_line(NULL, evalarg) == NULL)
2187 break; 2192 break;
2188 } 2193 }
2189 return NULL; 2194 return NULL;
2190 } 2195 }