0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.0601: Vim9: :unlet is not compiled

Problem:    Vim9: :unlet is not compiled.
Solution:   Implement :unlet instruction and check for errors.
This commit is contained in:
Bram Moolenaar
2020-04-19 16:28:59 +02:00
parent d3aac2917d
commit d72c1bf0a6
10 changed files with 232 additions and 35 deletions

View File

@@ -44,6 +44,8 @@ typedef enum {
ISN_STORENR, // store number into local variable isn_arg.storenr.stnr_idx
ISN_UNLET, // unlet variable isn_arg.unlet.ul_name
// constants
ISN_PUSHNR, // push number isn_arg.number
ISN_PUSHBOOL, // push bool value isn_arg.number
@@ -205,6 +207,12 @@ typedef struct {
int script_idx; // index in sn_var_vals
} script_T;
// arguments to ISN_UNLET
typedef struct {
char_u *ul_name; // variable name with g:, w:, etc.
int ul_forceit; // forceit flag
} unlet_T;
/*
* Instruction
*/
@@ -235,6 +243,7 @@ struct isn_S {
storeopt_T storeopt;
loadstore_T loadstore;
script_T script;
unlet_T unlet;
} isn_arg;
};