comparison src/vim9.h @ 19283:9dc843109c97 v8.2.0200

patch 8.2.0200: Vim9 script commands not sufficiently tested Commit: https://github.com/vim/vim/commit/b283a8a6802ef8a46b17cb439f9514840c03698f Author: Bram Moolenaar <Bram@vim.org> Date: Sun Feb 2 22:24:04 2020 +0100 patch 8.2.0200: Vim9 script commands not sufficiently tested Problem: Vim9 script commands not sufficiently tested. Solution: Add more tests. Fix storing global variable. Make script variables work.
author Bram Moolenaar <Bram@vim.org>
date Sun, 02 Feb 2020 22:30:04 +0100
parents 94eda51ba9ba
children 61646c189622
comparison
equal deleted inserted replaced
19282:0d513180baa1 19283:9dc843109c97
16 ISN_ECHO, // echo isn_arg.number items on top of stack 16 ISN_ECHO, // echo isn_arg.number items on top of stack
17 17
18 // get and set variables 18 // get and set variables
19 ISN_LOAD, // push local variable isn_arg.number 19 ISN_LOAD, // push local variable isn_arg.number
20 ISN_LOADV, // push v: variable isn_arg.number 20 ISN_LOADV, // push v: variable isn_arg.number
21 ISN_LOADG, // push g: variable isn_arg.string
22 ISN_LOADS, // push s: variable isn_arg.loadstore
21 ISN_LOADSCRIPT, // push script-local variable isn_arg.script. 23 ISN_LOADSCRIPT, // push script-local variable isn_arg.script.
22 ISN_LOADS, // push s: variable isn_arg.string
23 ISN_LOADG, // push g: variable isn_arg.string
24 ISN_LOADOPT, // push option isn_arg.string 24 ISN_LOADOPT, // push option isn_arg.string
25 ISN_LOADENV, // push environment variable isn_arg.string 25 ISN_LOADENV, // push environment variable isn_arg.string
26 ISN_LOADREG, // push register isn_arg.number 26 ISN_LOADREG, // push register isn_arg.number
27 27
28 ISN_STORE, // pop into local variable isn_arg.number 28 ISN_STORE, // pop into local variable isn_arg.number
29 ISN_STOREV, // pop into v: variable isn_arg.number
29 ISN_STOREG, // pop into global variable isn_arg.string 30 ISN_STOREG, // pop into global variable isn_arg.string
31 ISN_STORES, // pop into scirpt variable isn_arg.loadstore
30 ISN_STORESCRIPT, // pop into scirpt variable isn_arg.script 32 ISN_STORESCRIPT, // pop into scirpt variable isn_arg.script
31 ISN_STOREOPT, // pop into option isn_arg.string 33 ISN_STOREOPT, // pop into option isn_arg.string
34 ISN_STOREENV, // pop into environment variable isn_arg.string
35 ISN_STOREREG, // pop into register isn_arg.number
32 // ISN_STOREOTHER, // pop into other script variable isn_arg.other. 36 // ISN_STOREOTHER, // pop into other script variable isn_arg.other.
33 37
34 ISN_STORENR, // store number into local variable isn_arg.storenr.str_idx 38 ISN_STORENR, // store number into local variable isn_arg.storenr.str_idx
35 39
36 // constants 40 // constants
178 typedef struct { 182 typedef struct {
179 char_u *so_name; 183 char_u *so_name;
180 int so_flags; 184 int so_flags;
181 } storeopt_T; 185 } storeopt_T;
182 186
183 // arguments to ISN_LOADS 187 // arguments to ISN_LOADS and ISN_STORES
184 typedef struct { 188 typedef struct {
185 char_u *ls_name; // variable name 189 char_u *ls_name; // variable name
186 int ls_sid; // script ID 190 int ls_sid; // script ID
187 } loads_T; 191 } loadstore_T;
188 192
189 // arguments to ISN_LOADSCRIPT 193 // arguments to ISN_LOADSCRIPT and ISN_STORESCRIPT
190 typedef struct { 194 typedef struct {
191 int script_sid; // script ID 195 int script_sid; // script ID
192 int script_idx; // index in sn_var_vals 196 int script_idx; // index in sn_var_vals
193 } script_T; 197 } script_T;
194 198
215 echo_T echo; 219 echo_T echo;
216 opexpr_T op; 220 opexpr_T op;
217 checktype_T type; 221 checktype_T type;
218 storenr_T storenr; 222 storenr_T storenr;
219 storeopt_T storeopt; 223 storeopt_T storeopt;
220 loads_T loads; 224 loadstore_T loadstore;
221 script_T script; 225 script_T script;
222 } isn_arg; 226 } isn_arg;
223 } isn_T; 227 } isn_T;
224 228
225 /* 229 /*