comparison src/structs.h @ 26980:8796f1384750 v8.2.4019

patch 8.2.4019: Vim9: import mechanism is too complicated Commit: https://github.com/vim/vim/commit/d5f400c607182db6d4fbe2964471d796277f67e8 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jan 6 21:10:28 2022 +0000 patch 8.2.4019: Vim9: import mechanism is too complicated Problem: Vim9: import mechanism is too complicated. Solution: Do not use the Javascript mechanism but a much simpler one.
author Bram Moolenaar <Bram@vim.org>
date Thu, 06 Jan 2022 22:15:04 +0100
parents aa613a3084b9
children b0ef52086d57
comparison
equal deleted inserted replaced
26979:2fb4968983af 26980:8796f1384750
1820 int sv_export; // "export let var = val" 1820 int sv_export; // "export let var = val"
1821 }; 1821 };
1822 1822
1823 typedef struct { 1823 typedef struct {
1824 char_u *imp_name; // name imported as (allocated) 1824 char_u *imp_name; // name imported as (allocated)
1825 int imp_sid; // script ID of "from" 1825 scid_T imp_sid; // script ID of "from"
1826
1827 int imp_flags; // IMP_FLAGS_ values 1826 int imp_flags; // IMP_FLAGS_ values
1828
1829 // for a variable
1830 type_T *imp_type;
1831 int imp_var_vals_idx; // index in sn_var_vals of "from"
1832
1833 // for a function
1834 char_u *imp_funcname; // user func name (NOT allocated)
1835 } imported_T; 1827 } imported_T;
1836 1828
1837 #define IMP_FLAGS_STAR 1 // using "import * as Name"
1838 #define IMP_FLAGS_RELOAD 2 // script reloaded, OK to redefine 1829 #define IMP_FLAGS_RELOAD 2 // script reloaded, OK to redefine
1839 1830
1840 /* 1831 /*
1841 * Info about an already sourced scripts. 1832 * Info about an already sourced scripts.
1842 */ 1833 */
4262 { 4253 {
4263 char_u *ll_name; // start of variable name (can be NULL) 4254 char_u *ll_name; // start of variable name (can be NULL)
4264 char_u *ll_name_end; // end of variable name (can be NULL) 4255 char_u *ll_name_end; // end of variable name (can be NULL)
4265 type_T *ll_type; // type of variable (can be NULL) 4256 type_T *ll_type; // type of variable (can be NULL)
4266 char_u *ll_exp_name; // NULL or expanded name in allocated memory. 4257 char_u *ll_exp_name; // NULL or expanded name in allocated memory.
4258
4259 scid_T ll_sid; // for an imported item: the script ID it was
4260 // imported from; zero otherwise
4261
4267 typval_T *ll_tv; // Typeval of item being used. If "newkey" 4262 typval_T *ll_tv; // Typeval of item being used. If "newkey"
4268 // isn't NULL it's the Dict to which to add 4263 // isn't NULL it's the Dict to which to add
4269 // the item. 4264 // the item.
4270 listitem_T *ll_li; // The list item or NULL. 4265 listitem_T *ll_li; // The list item or NULL.
4271 list_T *ll_list; // The list or NULL. 4266 list_T *ll_list; // The list or NULL.