Mercurial > vim
comparison src/vim9compile.c @ 22584:c271498e03b2 v8.2.1840
patch 8.2.1840: Vim9: error message is not clear about compilation error
Commit: https://github.com/vim/vim/commit/f4e8cdd3d2156ab52aea1c7a392df66b7210e5eb
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Oct 12 22:07:13 2020 +0200
patch 8.2.1840: Vim9: error message is not clear about compilation error
Problem: Vim9: error message is not clear about compilation error.
Solution: Say "compiling" instead of "processing".
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 12 Oct 2020 22:15:04 +0200 |
parents | 9870e8b6ed78 |
children | 107eae953b87 |
comparison
equal
deleted
inserted
replaced
22583:973eeeb5c6a6 | 22584:c271498e03b2 |
---|---|
6713 cctx_T cctx; | 6713 cctx_T cctx; |
6714 garray_T *instr; | 6714 garray_T *instr; |
6715 int called_emsg_before = called_emsg; | 6715 int called_emsg_before = called_emsg; |
6716 int ret = FAIL; | 6716 int ret = FAIL; |
6717 sctx_T save_current_sctx = current_sctx; | 6717 sctx_T save_current_sctx = current_sctx; |
6718 int save_estack_compiling = estack_compiling; | |
6718 int do_estack_push; | 6719 int do_estack_push; |
6719 int emsg_before = called_emsg; | 6720 int emsg_before = called_emsg; |
6720 int new_def_function = FALSE; | 6721 int new_def_function = FALSE; |
6721 | 6722 |
6722 // When using a function that was compiled before: Free old instructions. | 6723 // When using a function that was compiled before: Free old instructions. |
6755 | 6756 |
6756 // Make sure error messages are OK. | 6757 // Make sure error messages are OK. |
6757 do_estack_push = !estack_top_is_ufunc(ufunc, 1); | 6758 do_estack_push = !estack_top_is_ufunc(ufunc, 1); |
6758 if (do_estack_push) | 6759 if (do_estack_push) |
6759 estack_push_ufunc(ufunc, 1); | 6760 estack_push_ufunc(ufunc, 1); |
6761 estack_compiling = TRUE; | |
6760 | 6762 |
6761 if (ufunc->uf_def_args.ga_len > 0) | 6763 if (ufunc->uf_def_args.ga_len > 0) |
6762 { | 6764 { |
6763 int count = ufunc->uf_def_args.ga_len; | 6765 int count = ufunc->uf_def_args.ga_len; |
6764 int first_def_arg = ufunc->uf_args.ga_len - count; | 6766 int first_def_arg = ufunc->uf_args.ga_len - count; |
7301 else if (called_emsg == called_emsg_before) | 7303 else if (called_emsg == called_emsg_before) |
7302 emsg(_(e_compile_def_function_failed)); | 7304 emsg(_(e_compile_def_function_failed)); |
7303 } | 7305 } |
7304 | 7306 |
7305 current_sctx = save_current_sctx; | 7307 current_sctx = save_current_sctx; |
7308 estack_compiling = save_estack_compiling; | |
7306 if (do_estack_push) | 7309 if (do_estack_push) |
7307 estack_pop(); | 7310 estack_pop(); |
7308 | 7311 |
7309 free_imported(&cctx); | 7312 free_imported(&cctx); |
7310 free_locals(&cctx); | 7313 free_locals(&cctx); |