diff 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
line wrap: on
line diff
--- a/src/vim9.h
+++ b/src/vim9.h
@@ -112,6 +112,7 @@ typedef enum {
     // expression operations
     ISN_CONCAT,
     ISN_INDEX,	    // [expr] list index
+    ISN_SLICE,	    // drop isn_arg.number items from start of list
     ISN_GETITEM,    // push list item, isn_arg.number is the index
     ISN_MEMBER,	    // dict[member]
     ISN_STRINGMEMBER, // dict.member using isn_arg.string
@@ -121,6 +122,7 @@ typedef enum {
 
     ISN_CHECKNR,    // check value can be used as a number
     ISN_CHECKTYPE,  // check value type is isn_arg.type.tc_type
+    ISN_CHECKLEN,   // check list length is isn_arg.checklen.cl_min_len
 
     ISN_DROP	    // pop stack and discard value
 } isntype_T;
@@ -229,6 +231,12 @@ typedef struct {
     int		fr_var_idx;	// variable to store partial
 } funcref_T;
 
+// arguments to ISN_CHECKLEN
+typedef struct {
+    int		cl_min_len;	// minimum length
+    int		cl_more_OK;	// longer is allowed
+} checklen_T;
+
 /*
  * Instruction
  */
@@ -261,6 +269,7 @@ struct isn_S {
 	script_T	    script;
 	unlet_T		    unlet;
 	funcref_T	    funcref;
+	checklen_T	    checklen;
     } isn_arg;
 };