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.
diff --git a/src/structs.h b/src/structs.h
index ba2bec6..a6cd346 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -83,9 +83,11 @@
* 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 @@
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 @@
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 @@
/*
* 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 @@
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;