0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.2034: Vim9: list unpack in for statement not compiled yet

Problem:    Vim9: list unpack in for statement not compiled yet.
Solution:   Compile list unpack. (closes #7345)
This commit is contained in:
Bram Moolenaar
2020-11-23 08:31:18 +01:00
parent 6abdcf8285
commit 792f786aad
8 changed files with 269 additions and 35 deletions

View File

@@ -146,6 +146,7 @@ typedef enum {
ISN_CMDMOD, // set cmdmod
ISN_CMDMOD_REV, // undo ISN_CMDMOD
ISN_UNPACK, // unpack list into items, uses isn_arg.unpack
ISN_SHUFFLE, // move item on stack up or down
ISN_DROP // pop stack and discard value
} isntype_T;
@@ -284,6 +285,12 @@ typedef struct {
cmdmod_T *cf_cmdmod; // allocated
} cmod_T;
// arguments to ISN_UNPACK
typedef struct {
int unp_count; // number of items to produce
int unp_semicolon; // last item gets list of remainder
} unpack_T;
/*
* Instruction
*/
@@ -321,6 +328,7 @@ struct isn_S {
shuffle_T shuffle;
put_T put;
cmod_T cmdmod;
unpack_T unpack;
} isn_arg;
};