comparison src/vim9.h @ 20091:a64c16ff98b8 v8.2.0601

patch 8.2.0601: Vim9: :unlet is not compiled Commit: https://github.com/vim/vim/commit/d72c1bf0a6784afdc8d8ceab4a007cd76d5b81e1 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Apr 19 16:28:59 2020 +0200 patch 8.2.0601: Vim9: :unlet is not compiled Problem: Vim9: :unlet is not compiled. Solution: Implement :unlet instruction and check for errors.
author Bram Moolenaar <Bram@vim.org>
date Sun, 19 Apr 2020 16:30:04 +0200
parents 7fc5d62fe2a5
children 058b41f85bcb
comparison
equal deleted inserted replaced
20090:b2225a10b777 20091:a64c16ff98b8
42 ISN_STOREREG, // pop into register isn_arg.number 42 ISN_STOREREG, // pop into register isn_arg.number
43 // ISN_STOREOTHER, // pop into other script variable isn_arg.other. 43 // ISN_STOREOTHER, // pop into other script variable isn_arg.other.
44 44
45 ISN_STORENR, // store number into local variable isn_arg.storenr.stnr_idx 45 ISN_STORENR, // store number into local variable isn_arg.storenr.stnr_idx
46 46
47 ISN_UNLET, // unlet variable isn_arg.unlet.ul_name
48
47 // constants 49 // constants
48 ISN_PUSHNR, // push number isn_arg.number 50 ISN_PUSHNR, // push number isn_arg.number
49 ISN_PUSHBOOL, // push bool value isn_arg.number 51 ISN_PUSHBOOL, // push bool value isn_arg.number
50 ISN_PUSHSPEC, // push special value isn_arg.number 52 ISN_PUSHSPEC, // push special value isn_arg.number
51 ISN_PUSHF, // push float isn_arg.fnumber 53 ISN_PUSHF, // push float isn_arg.fnumber
202 // arguments to ISN_LOADSCRIPT and ISN_STORESCRIPT 204 // arguments to ISN_LOADSCRIPT and ISN_STORESCRIPT
203 typedef struct { 205 typedef struct {
204 int script_sid; // script ID 206 int script_sid; // script ID
205 int script_idx; // index in sn_var_vals 207 int script_idx; // index in sn_var_vals
206 } script_T; 208 } script_T;
209
210 // arguments to ISN_UNLET
211 typedef struct {
212 char_u *ul_name; // variable name with g:, w:, etc.
213 int ul_forceit; // forceit flag
214 } unlet_T;
207 215
208 /* 216 /*
209 * Instruction 217 * Instruction
210 */ 218 */
211 struct isn_S { 219 struct isn_S {
233 checktype_T type; 241 checktype_T type;
234 storenr_T storenr; 242 storenr_T storenr;
235 storeopt_T storeopt; 243 storeopt_T storeopt;
236 loadstore_T loadstore; 244 loadstore_T loadstore;
237 script_T script; 245 script_T script;
246 unlet_T unlet;
238 } isn_arg; 247 } isn_arg;
239 }; 248 };
240 249
241 /* 250 /*
242 * Info about a function defined with :def. Used in "def_functions". 251 * Info about a function defined with :def. Used in "def_functions".