diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-01-26 15:56:19 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-01-26 15:56:19 +0100 |
commit | 8a7d6542b33e5d2b352262305c3bfdb2d14e1cf8 (patch) | |
tree | 8e5f241129a1c690ea81d697a72fb4c1704c0cb6 /src/ex_eval.c | |
parent | 1d9215b9aaa120b9d78fee49488556f73007ce78 (diff) | |
download | vim-git-8a7d6542b33e5d2b352262305c3bfdb2d14e1cf8.tar.gz |
patch 8.2.0149: maintaining a Vim9 branch separately is more workv8.2.0149
Problem: Maintaining a Vim9 branch separately is more work.
Solution: Merge the Vim9 script changes.
Diffstat (limited to 'src/ex_eval.c')
-rw-r--r-- | src/ex_eval.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/ex_eval.c b/src/ex_eval.c index 382e99e0d..70b52a369 100644 --- a/src/ex_eval.c +++ b/src/ex_eval.c @@ -15,7 +15,6 @@ #if defined(FEAT_EVAL) || defined(PROTO) -static int throw_exception(void *, except_type_T, char_u *); static char *get_end_emsg(cstack_T *cstack); /* @@ -498,7 +497,7 @@ get_exception_string( * user or interrupt exception, or points to a message list in case of an * error exception. */ - static int + int throw_exception(void *value, except_type_T type, char_u *cmdname) { except_T *excp; @@ -649,7 +648,7 @@ discard_current_exception(void) /* * Put an exception on the caught stack. */ - static void + void catch_exception(except_T *excp) { excp->caught = caught_stack; @@ -932,7 +931,7 @@ ex_endif(exarg_T *eap) if (eap->cstack->cs_idx < 0 || (eap->cstack->cs_flags[eap->cstack->cs_idx] & (CSF_WHILE | CSF_FOR | CSF_TRY))) - eap->errmsg = N_("E580: :endif without :if"); + eap->errmsg = N_(e_endif_without_if); else { /* @@ -976,10 +975,10 @@ ex_else(exarg_T *eap) { if (eap->cmdidx == CMD_else) { - eap->errmsg = N_("E581: :else without :if"); + eap->errmsg = N_(e_else_without_if); return; } - eap->errmsg = N_("E582: :elseif without :if"); + eap->errmsg = N_(e_elseif_without_if); skip = TRUE; } else if (cstack->cs_flags[cstack->cs_idx] & CSF_ELSE) @@ -1152,7 +1151,7 @@ ex_continue(exarg_T *eap) cstack_T *cstack = eap->cstack; if (cstack->cs_looplevel <= 0 || cstack->cs_idx < 0) - eap->errmsg = N_("E586: :continue without :while or :for"); + eap->errmsg = N_(e_continue); else { // Try to find the matching ":while". This might stop at a try @@ -1190,7 +1189,7 @@ ex_break(exarg_T *eap) cstack_T *cstack = eap->cstack; if (cstack->cs_looplevel <= 0 || cstack->cs_idx < 0) - eap->errmsg = N_("E587: :break without :while or :for"); + eap->errmsg = N_(e_break); else { // Inactivate conditionals until the matching ":while" or a try @@ -1492,7 +1491,7 @@ ex_catch(exarg_T *eap) if (cstack->cs_trylevel <= 0 || cstack->cs_idx < 0) { - eap->errmsg = N_("E603: :catch without :try"); + eap->errmsg = e_catch; give_up = TRUE; } else @@ -1648,7 +1647,7 @@ ex_finally(exarg_T *eap) cstack_T *cstack = eap->cstack; if (cstack->cs_trylevel <= 0 || cstack->cs_idx < 0) - eap->errmsg = N_("E606: :finally without :try"); + eap->errmsg = e_finally; else { if (!(cstack->cs_flags[cstack->cs_idx] & CSF_TRY)) @@ -1668,7 +1667,7 @@ ex_finally(exarg_T *eap) if (cstack->cs_flags[idx] & CSF_FINALLY) { // Give up for a multiple ":finally" and ignore it. - eap->errmsg = N_("E607: multiple :finally"); + eap->errmsg = e_finally_dup; return; } rewind_conditionals(cstack, idx, CSF_WHILE | CSF_FOR, @@ -1777,7 +1776,7 @@ ex_endtry(exarg_T *eap) cstack_T *cstack = eap->cstack; if (cstack->cs_trylevel <= 0 || cstack->cs_idx < 0) - eap->errmsg = N_("E602: :endtry without :try"); + eap->errmsg = e_no_endtry; else { /* |