Mercurial > vim
comparison src/vim9.h @ 20871:65d9189d4dca v8.2.0987
patch 8.2.0987: Vim9: cannot assign to [var; var]
Commit: https://github.com/vim/vim/commit/9af78769eeae0318e07aa8b6af4d6e2244481ca7
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jun 16 11:34:42 2020 +0200
patch 8.2.0987: Vim9: cannot assign to [var; var]
Problem: Vim9: cannot assign to [var; var].
Solution: Assign rest of items to a list.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 16 Jun 2020 11:45:04 +0200 |
parents | 876e16c48bd1 |
children | 3f14e0d4a4dd |
comparison
equal
deleted
inserted
replaced
20870:6203fd2cfb51 | 20871:65d9189d4dca |
---|---|
110 ISN_COMPAREANY, | 110 ISN_COMPAREANY, |
111 | 111 |
112 // expression operations | 112 // expression operations |
113 ISN_CONCAT, | 113 ISN_CONCAT, |
114 ISN_INDEX, // [expr] list index | 114 ISN_INDEX, // [expr] list index |
115 ISN_SLICE, // drop isn_arg.number items from start of list | |
115 ISN_GETITEM, // push list item, isn_arg.number is the index | 116 ISN_GETITEM, // push list item, isn_arg.number is the index |
116 ISN_MEMBER, // dict[member] | 117 ISN_MEMBER, // dict[member] |
117 ISN_STRINGMEMBER, // dict.member using isn_arg.string | 118 ISN_STRINGMEMBER, // dict.member using isn_arg.string |
118 ISN_2BOOL, // convert value to bool, invert if isn_arg.number != 0 | 119 ISN_2BOOL, // convert value to bool, invert if isn_arg.number != 0 |
119 ISN_2STRING, // convert value to string at isn_arg.number on stack | 120 ISN_2STRING, // convert value to string at isn_arg.number on stack |
120 ISN_NEGATENR, // apply "-" to number | 121 ISN_NEGATENR, // apply "-" to number |
121 | 122 |
122 ISN_CHECKNR, // check value can be used as a number | 123 ISN_CHECKNR, // check value can be used as a number |
123 ISN_CHECKTYPE, // check value type is isn_arg.type.tc_type | 124 ISN_CHECKTYPE, // check value type is isn_arg.type.tc_type |
125 ISN_CHECKLEN, // check list length is isn_arg.checklen.cl_min_len | |
124 | 126 |
125 ISN_DROP // pop stack and discard value | 127 ISN_DROP // pop stack and discard value |
126 } isntype_T; | 128 } isntype_T; |
127 | 129 |
128 | 130 |
226 // arguments to ISN_FUNCREF | 228 // arguments to ISN_FUNCREF |
227 typedef struct { | 229 typedef struct { |
228 int fr_func; // function index | 230 int fr_func; // function index |
229 int fr_var_idx; // variable to store partial | 231 int fr_var_idx; // variable to store partial |
230 } funcref_T; | 232 } funcref_T; |
233 | |
234 // arguments to ISN_CHECKLEN | |
235 typedef struct { | |
236 int cl_min_len; // minimum length | |
237 int cl_more_OK; // longer is allowed | |
238 } checklen_T; | |
231 | 239 |
232 /* | 240 /* |
233 * Instruction | 241 * Instruction |
234 */ | 242 */ |
235 struct isn_S { | 243 struct isn_S { |
259 storeopt_T storeopt; | 267 storeopt_T storeopt; |
260 loadstore_T loadstore; | 268 loadstore_T loadstore; |
261 script_T script; | 269 script_T script; |
262 unlet_T unlet; | 270 unlet_T unlet; |
263 funcref_T funcref; | 271 funcref_T funcref; |
272 checklen_T checklen; | |
264 } isn_arg; | 273 } isn_arg; |
265 }; | 274 }; |
266 | 275 |
267 /* | 276 /* |
268 * Info about a function defined with :def. Used in "def_functions". | 277 * Info about a function defined with :def. Used in "def_functions". |