comparison src/structs.h @ 23390:9a5f12b36273 v8.2.2238

patch 8.2.2238: Vim9: cannot load a Vim9 script without the +eval feature Commit: https://github.com/vim/vim/commit/9b8d62267f583d5dc042920adb1de046959ad11d Author: Bram Moolenaar <Bram@vim.org> Date: Mon Dec 28 18:26:00 2020 +0100 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.
author Bram Moolenaar <Bram@vim.org>
date Mon, 28 Dec 2020 18:30:03 +0100
parents 17a0e32eefd4
children 517fca70e084
comparison
equal deleted inserted replaced
23389:f67d856ae24e 23390:9a5f12b36273
81 * the line number in the script "sc_sid". 81 * the line number in the script "sc_sid".
82 * 82 *
83 * sc_version is also here, for convenience. 83 * sc_version is also here, for convenience.
84 */ 84 */
85 typedef struct { 85 typedef struct {
86 #ifdef FEAT_EVAL
86 scid_T sc_sid; // script ID 87 scid_T sc_sid; // script ID
87 int sc_seq; // sourcing sequence number 88 int sc_seq; // sourcing sequence number
88 linenr_T sc_lnum; // line number 89 linenr_T sc_lnum; // line number
90 #endif
89 int sc_version; // :scriptversion 91 int sc_version; // :scriptversion
90 } sctx_T; 92 } sctx_T;
91 93
92 /* 94 /*
93 * Reference to a buffer that stores the value of buf_free_count. 95 * Reference to a buffer that stores the value of buf_free_count.
1222 // if seenModifyOtherKeys is TRUE 1224 // if seenModifyOtherKeys is TRUE
1223 int m_noremap; // if non-zero no re-mapping for m_str 1225 int m_noremap; // if non-zero no re-mapping for m_str
1224 char m_silent; // <silent> used, don't echo commands 1226 char m_silent; // <silent> used, don't echo commands
1225 char m_nowait; // <nowait> used 1227 char m_nowait; // <nowait> used
1226 #ifdef FEAT_EVAL 1228 #ifdef FEAT_EVAL
1229 sctx_T m_script_ctx; // SCTX where map was defined
1227 char m_expr; // <expr> used, m_str is an expression 1230 char m_expr; // <expr> used, m_str is an expression
1228 sctx_T m_script_ctx; // SCTX where map was defined
1229 #endif 1231 #endif
1230 }; 1232 };
1231 1233
1232 1234
1233 /* 1235 /*
1565 GETLINE_NONE, // do not concatenate any lines 1567 GETLINE_NONE, // do not concatenate any lines
1566 GETLINE_CONCAT_CONT, // concatenate continuation lines 1568 GETLINE_CONCAT_CONT, // concatenate continuation lines
1567 GETLINE_CONCAT_ALL // concatenate continuation and Vim9 # comment lines 1569 GETLINE_CONCAT_ALL // concatenate continuation and Vim9 # comment lines
1568 } getline_opt_T; 1570 } getline_opt_T;
1569 1571
1572 typedef struct svar_S svar_T;
1573
1570 #if defined(FEAT_EVAL) || defined(PROTO) 1574 #if defined(FEAT_EVAL) || defined(PROTO)
1571 typedef struct funccall_S funccall_T; 1575 typedef struct funccall_S funccall_T;
1572 1576
1573 // values used for "uf_dfunc_idx" 1577 // values used for "uf_dfunc_idx"
1574 typedef enum { 1578 typedef enum {
1764 #define HI2SAV(hi) HIKEY2SAV((hi)->hi_key) 1768 #define HI2SAV(hi) HIKEY2SAV((hi)->hi_key)
1765 1769
1766 /* 1770 /*
1767 * Entry for "sn_var_vals". Used for script-local variables. 1771 * Entry for "sn_var_vals". Used for script-local variables.
1768 */ 1772 */
1769 typedef struct { 1773 struct svar_S {
1770 char_u *sv_name; // points into "sn_all_vars" di_key 1774 char_u *sv_name; // points into "sn_all_vars" di_key
1771 typval_T *sv_tv; // points into "sn_vars" or "sn_all_vars" di_tv 1775 typval_T *sv_tv; // points into "sn_vars" or "sn_all_vars" di_tv
1772 type_T *sv_type; 1776 type_T *sv_type;
1773 int sv_const; 1777 int sv_const;
1774 int sv_export; // "export let var = val" 1778 int sv_export; // "export let var = val"
1775 } svar_T; 1779 };
1776 1780
1777 typedef struct { 1781 typedef struct {
1778 char_u *imp_name; // name imported as (allocated) 1782 char_u *imp_name; // name imported as (allocated)
1779 int imp_sid; // script ID of "from" 1783 int imp_sid; // script ID of "from"
1780 1784
4162 int save_State; 4166 int save_State;
4163 int save_insertmode; 4167 int save_insertmode;
4164 int save_finish_op; 4168 int save_finish_op;
4165 int save_opcount; 4169 int save_opcount;
4166 int save_reg_executing; 4170 int save_reg_executing;
4167 #ifdef FEAT_EVAL
4168 int save_script_version; 4171 int save_script_version;
4169 #endif
4170 tasave_T tabuf; 4172 tasave_T tabuf;
4171 } save_state_T; 4173 } save_state_T;
4172 4174
4173 typedef struct { 4175 typedef struct {
4174 varnumber_T vv_prevcount; 4176 varnumber_T vv_prevcount;