Mercurial > vim
diff src/vim9compile.c @ 21120:4d844a65183d v8.2.1111
patch 8.2.1111: inconsistent naming of get_list_tv() and eval_dict()
Commit: https://github.com/vim/vim/commit/9a78e6df17033223ebdf499f2b02b2538601c52d
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jul 1 18:29:55 2020 +0200
patch 8.2.1111: inconsistent naming of get_list_tv() and eval_dict()
Problem: Inconsistent naming of get_list_tv() and eval_dict().
Solution: Rename get_list_tv() to eval_list(). Similarly for eval_number(),
eval_string(), eval_lit_string() and a few others.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 01 Jul 2020 18:45:04 +0200 |
parents | 9b57c92991c6 |
children | 465d6e40e79c |
line wrap: on
line diff
--- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -2868,9 +2868,9 @@ compile_call( argvars[0].v_type = VAR_UNKNOWN; if (*s == '"') - (void)get_string_tv(&s, &argvars[0], TRUE); + (void)eval_string(&s, &argvars[0], TRUE); else if (*s == '\'') - (void)get_lit_string_tv(&s, &argvars[0], TRUE); + (void)eval_lit_string(&s, &argvars[0], TRUE); s = skipwhite(s); if (*s == ')' && argvars[0].v_type == VAR_STRING) { @@ -2992,7 +2992,7 @@ to_name_const_end(char_u *arg) { // Can be "[1, 2, 3]->Func()". - if (get_list_tv(&p, &rettv, NULL, FALSE) == FAIL) + if (eval_list(&p, &rettv, NULL, FALSE) == FAIL) p = arg; } else if (p == arg && *arg == '#' && arg[1] == '{') @@ -3270,10 +3270,10 @@ compile_get_option(char_u **arg, cctx_T // parse the option and get the current value to get the type. rettv.v_type = VAR_UNKNOWN; - ret = get_option_tv(arg, &rettv, TRUE); + ret = eval_option(arg, &rettv, TRUE); if (ret == OK) { - // include the '&' in the name, get_option_tv() expects it. + // include the '&' in the name, eval_option() expects it. char_u *name = vim_strnsave(start, *arg - start); type_T *type = rettv.v_type == VAR_NUMBER ? &t_number : &t_string; @@ -3304,7 +3304,7 @@ compile_get_env(char_u **arg, cctx_T *cc return FAIL; } - // include the '$' in the name, get_env_tv() expects it. + // include the '$' in the name, eval_env_var() expects it. name = vim_strnsave(start, len + 1); ret = generate_LOAD(cctx, ISN_LOADENV, 0, name, &t_string); vim_free(name); @@ -3761,21 +3761,21 @@ compile_expr7( case '7': case '8': case '9': - case '.': if (get_number_tv(arg, rettv, TRUE, FALSE) == FAIL) + case '.': if (eval_number(arg, rettv, TRUE, FALSE) == FAIL) return FAIL; break; /* * String constant: "string". */ - case '"': if (get_string_tv(arg, rettv, TRUE) == FAIL) + case '"': if (eval_string(arg, rettv, TRUE) == FAIL) return FAIL; break; /* * Literal string constant: 'str''ing'. */ - case '\'': if (get_lit_string_tv(arg, rettv, TRUE) == FAIL) + case '\'': if (eval_lit_string(arg, rettv, TRUE) == FAIL) return FAIL; break;