summaryrefslogtreecommitdiff
path: root/src/vim9.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-07-09 21:20:47 +0200
committerBram Moolenaar <Bram@vim.org>2020-07-09 21:20:47 +0200
commit389df259c49d1ca4f7aa129b702f6083985b1e73 (patch)
tree8c9d44999305e3660ccf09dbd2d4b7aa935744a9 /src/vim9.h
parentae97b94176062d30ea8c68bb83cde034c5150c78 (diff)
downloadvim-git-389df259c49d1ca4f7aa129b702f6083985b1e73.tar.gz
patch 8.2.1167: Vim9: builtin function method call only supports first argv8.2.1167
Problem: Vim9: builtin function method call only supports first argument. Solution: Shift arguments when needed. (closes #6305, closes #6419)
Diffstat (limited to 'src/vim9.h')
-rw-r--r--src/vim9.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/vim9.h b/src/vim9.h
index 259bdb911..10f983ca9 100644
--- a/src/vim9.h
+++ b/src/vim9.h
@@ -124,6 +124,7 @@ typedef enum {
ISN_CHECKTYPE, // check value type is isn_arg.type.tc_type
ISN_CHECKLEN, // check list length is isn_arg.checklen.cl_min_len
+ ISN_SHUFFLE, // move item on stack up or down
ISN_DROP // pop stack and discard value
} isntype_T;
@@ -237,6 +238,12 @@ typedef struct {
int cl_more_OK; // longer is allowed
} checklen_T;
+// arguments to ISN_SHUFFLE
+typedef struct {
+ int shfl_item; // item to move (relative to top of stack)
+ int shfl_up; // places to move upwards
+} shuffle_T;
+
/*
* Instruction
*/
@@ -270,6 +277,7 @@ struct isn_S {
unlet_T unlet;
funcref_T funcref;
checklen_T checklen;
+ shuffle_T shuffle;
} isn_arg;
};