vim-patch:8.2.1047: Vim9: script cannot use line continuation like :def function

Problem:    Vim9: script cannot use line continuation like in a :def function.
Solution:   Pass the getline function pointer to the eval() functions.  Use it
            for addition and multiplication operators.

5409f5d8c9

Omit source_nextline() and eval_next_non_blank(): Vim9 script only.

N/A patches for version.c:

vim-patch:8.2.1048: build failure without the eval feature

Problem:    Build failure without the eval feature.
Solution:   Add dummy typedef.

9d40c63c7d

vim-patch:8.2.1052: build failure with older compilers

Problem:    Build failure with older compilers.
Solution:   Move declaration to start of block.

7acde51832

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2023-04-14 07:22:01 +08:00
parent f64f6706e5
commit bd83b587b1
9 changed files with 127 additions and 79 deletions

View File

@@ -255,13 +255,18 @@ void ex_let(exarg_T *eap)
if (eap->skip) {
emsg_skip++;
}
int eval_flags = eap->skip ? 0 : EVAL_EVALUATE;
i = eval0(expr, &rettv, &eap->nextcmd, eval_flags);
evalarg_T evalarg = {
.eval_flags = eap->skip ? 0 : EVAL_EVALUATE,
.eval_cookie = eap->getline == getsourceline ? eap->cookie : NULL,
};
i = eval0(expr, &rettv, &eap->nextcmd, &evalarg);
if (eap->skip) {
emsg_skip--;
}
if (eap->skip) {
if (i != FAIL) {
tv_clear(&rettv);
}
emsg_skip--;
} else if (i != FAIL) {
(void)ex_let_vars(eap->arg, &rettv, false, semicolon, var_count, is_const, op);
tv_clear(&rettv);