1
0
forked from aniani/vim

patch 8.2.2238: Vim9: cannot load a Vim9 script without the +eval feature

Problem:    Vim9: cannot load a Vim9 script without the +eval feature.
Solution:   Support Vim9 script syntax without the +eval feature.
This commit is contained in:
Bram Moolenaar
2020-12-28 18:26:00 +01:00
parent ed1e4c9a70
commit 9b8d62267f
13 changed files with 63 additions and 65 deletions

View File

@@ -83,9 +83,11 @@ typedef struct VimMenu vimmenu_T;
* sc_version is also here, for convenience.
*/
typedef struct {
#ifdef FEAT_EVAL
scid_T sc_sid; // script ID
int sc_seq; // sourcing sequence number
linenr_T sc_lnum; // line number
#endif
int sc_version; // :scriptversion
} sctx_T;
@@ -1224,8 +1226,8 @@ struct mapblock
char m_silent; // <silent> used, don't echo commands
char m_nowait; // <nowait> used
#ifdef FEAT_EVAL
char m_expr; // <expr> used, m_str is an expression
sctx_T m_script_ctx; // SCTX where map was defined
char m_expr; // <expr> used, m_str is an expression
#endif
};
@@ -1567,6 +1569,8 @@ typedef enum {
GETLINE_CONCAT_ALL // concatenate continuation and Vim9 # comment lines
} getline_opt_T;
typedef struct svar_S svar_T;
#if defined(FEAT_EVAL) || defined(PROTO)
typedef struct funccall_S funccall_T;
@@ -1766,13 +1770,13 @@ struct sallvar_S {
/*
* Entry for "sn_var_vals". Used for script-local variables.
*/
typedef struct {
struct svar_S {
char_u *sv_name; // points into "sn_all_vars" di_key
typval_T *sv_tv; // points into "sn_vars" or "sn_all_vars" di_tv
type_T *sv_type;
int sv_const;
int sv_export; // "export let var = val"
} svar_T;
};
typedef struct {
char_u *imp_name; // name imported as (allocated)
@@ -4164,9 +4168,7 @@ typedef struct {
int save_finish_op;
int save_opcount;
int save_reg_executing;
#ifdef FEAT_EVAL
int save_script_version;
#endif
tasave_T tabuf;
} save_state_T;