comparison src/evalvars.c @ 31706:824fc05d9571 v9.0.1185

patch 9.0.1185: using class from imported script not tested Commit: https://github.com/vim/vim/commit/a86655af84f1596f0f3ef22813724fe06f1e4809 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jan 12 17:06:27 2023 +0000 patch 9.0.1185: using class from imported script not tested Problem: Using class from imported script not tested. Solution: Add tests. Implement what is missing.
author Bram Moolenaar <Bram@vim.org>
date Thu, 12 Jan 2023 18:15:05 +0100
parents 62237ea155d9
children f6309f6742e5
comparison
equal deleted inserted replaced
31705:9e44c0a6e54c 31706:824fc05d9571
3103 3103
3104 return ret; 3104 return ret;
3105 } 3105 }
3106 3106
3107 /* 3107 /*
3108 * Get the value of internal variable "name", also handling "import.name".
3109 * Return OK or FAIL. If OK is returned "rettv" must be cleared.
3110 */
3111 int
3112 eval_variable_import(
3113 char_u *name,
3114 typval_T *rettv)
3115 {
3116 char_u *s = name;
3117 while (ASCII_ISALNUM(*s) || *s == '_')
3118 ++s;
3119 int len = (int)(s - name);
3120
3121 if (eval_variable(name, len, 0, rettv, NULL, EVAL_VAR_IMPORT) == FAIL)
3122 return FAIL;
3123 if (rettv->v_type == VAR_ANY && *s == '.')
3124 {
3125 int sid = rettv->vval.v_number;
3126 return eval_variable(s + 1, 0, sid, rettv, NULL, 0);
3127 }
3128 return OK;
3129 }
3130
3131
3132 /*
3108 * Check if variable "name[len]" is a local variable or an argument. 3133 * Check if variable "name[len]" is a local variable or an argument.
3109 * If so, "*eval_lavars_used" is set to TRUE. 3134 * If so, "*eval_lavars_used" is set to TRUE.
3110 */ 3135 */
3111 void 3136 void
3112 check_vars(char_u *name, int len) 3137 check_vars(char_u *name, int len)