aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2022-11-22 01:09:33 +0100
committerGitHub <noreply@github.com>2022-11-22 08:09:33 +0800
commit7c10774860b4238090f0d36a26203080542ef1ac (patch)
tree024f6271c67c0cbd3bec6bddcc8edbc994d4cd23 /src
parent0cbc23d3cc327109176c0a9c0f8a48fc5196a6cd (diff)
downloadrneovim-7c10774860b4238090f0d36a26203080542ef1ac.tar.gz
rneovim-7c10774860b4238090f0d36a26203080542ef1ac.tar.bz2
rneovim-7c10774860b4238090f0d36a26203080542ef1ac.zip
refactor: remove old TODO comments that aren't relevant anymore (#21144)
Diffstat (limited to 'src')
-rw-r--r--src/nvim/eval.c38
-rw-r--r--src/nvim/eval/userfunc.c2
-rw-r--r--src/nvim/eval/vars.c16
-rw-r--r--src/nvim/ex_eval.c2
4 files changed, 0 insertions, 58 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 59dd689fa3..a41a559fd9 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -1236,8 +1236,6 @@ int eval_foldexpr(char *arg, int *cp)
return (int)retval;
}
-// TODO(ZyX-I): move to eval/executor
-
/// Get an lvalue
///
/// Lvalue may be
@@ -1622,8 +1620,6 @@ char *get_lval(char *const name, typval_T *const rettv, lval_T *const lp, const
return p;
}
-// TODO(ZyX-I): move to eval/executor
-
/// Clear lval "lp" that was filled by get_lval().
void clear_lval(lval_T *lp)
{
@@ -1631,8 +1627,6 @@ void clear_lval(lval_T *lp)
xfree(lp->ll_newkey);
}
-// TODO(ZyX-I): move to eval/executor
-
/// Set a variable that was parsed by get_lval() to "rettv".
///
/// @param endp points to just after the parsed name.
@@ -1840,8 +1834,6 @@ notify:
}
}
-// TODO(ZyX-I): move to eval/ex_cmds
-
/// Evaluate the expression used in a ":for var in expr" command.
/// "arg" points to "var".
///
@@ -1917,8 +1909,6 @@ void *eval_for_line(const char *arg, bool *errp, char **nextcmdp, int skip)
return fi;
}
-// TODO(ZyX-I): move to eval/ex_cmds
-
/// Use the first item in a ":for" list. Advance to the next.
/// Assign the values to the variable (list). "arg" points to the first one.
///
@@ -1965,8 +1955,6 @@ bool next_for_item(void *fi_void, char *arg)
fi->fi_semicolon, fi->fi_varcount, false, NULL) == OK);
}
-// TODO(ZyX-I): move to eval/ex_cmds
-
/// Free the structure used to store info used by ":for".
void free_for_info(void *fi_void)
{
@@ -2212,8 +2200,6 @@ char *get_user_var_name(expand_T *xp, int idx)
return NULL;
}
-// TODO(ZyX-I): move to eval/expressions
-
/// Does not use 'cpo' and always uses 'magic'.
///
/// @return true if "pat" matches "text".
@@ -2293,8 +2279,6 @@ static int eval_func(char **const arg, char *const name, const int name_len, typ
return ret;
}
-// TODO(ZyX-I): move to eval/expressions
-
/// The "evaluate" argument: When false, the argument is only parsed but not
/// executed. The function may return OK, but the rettv will be of type
/// VAR_UNKNOWN. The function still returns FAIL for a syntax error.
@@ -2344,8 +2328,6 @@ int eval0(char *arg, typval_T *rettv, char **nextcmd, int evaluate)
return ret;
}
-// TODO(ZyX-I): move to eval/expressions
-
/// Handle top level expression:
/// expr2 ? expr1 : expr1
///
@@ -2410,8 +2392,6 @@ int eval1(char **arg, typval_T *rettv, int evaluate)
return OK;
}
-// TODO(ZyX-I): move to eval/expressions
-
/// Handle first level expression:
/// expr2 || expr2 || expr2 logical OR
///
@@ -2469,8 +2449,6 @@ static int eval2(char **arg, typval_T *rettv, int evaluate)
return OK;
}
-// TODO(ZyX-I): move to eval/expressions
-
/// Handle second level expression:
/// expr3 && expr3 && expr3 logical AND
///
@@ -2528,8 +2506,6 @@ static int eval3(char **arg, typval_T *rettv, int evaluate)
return OK;
}
-// TODO(ZyX-I): move to eval/expressions
-
/// Handle third level expression:
/// var1 == var2
/// var1 =~ var2
@@ -2633,8 +2609,6 @@ static int eval4(char **arg, typval_T *rettv, int evaluate)
return OK;
}
-// TODO(ZyX-I): move to eval/expressions
-
/// Handle fourth level expression:
/// + number addition
/// - number subtraction
@@ -2796,8 +2770,6 @@ static int eval5(char **arg, typval_T *rettv, int evaluate)
return OK;
}
-// TODO(ZyX-I): move to eval/expressions
-
/// Handle fifth level expression:
/// - * number multiplication
/// - / number division
@@ -2913,8 +2885,6 @@ static int eval6(char **arg, typval_T *rettv, int evaluate, int want_string)
return OK;
}
-// TODO(ZyX-I): move to eval/expressions
-
/// Handle sixth level expression:
/// number number constant
/// 0zFFFFFFFF Blob constant
@@ -3408,8 +3378,6 @@ static int eval_method(char **const arg, typval_T *const rettv, const bool evalu
return ret;
}
-// TODO(ZyX-I): move to eval/expressions
-
/// Evaluate an "[expr]" or "[expr:expr]" index. Also "dict.key".
/// "*arg" points to the '[' or '.'.
///
@@ -3709,8 +3677,6 @@ static int eval_index(char **arg, typval_T *rettv, int evaluate, int verbose)
return OK;
}
-// TODO(ZyX-I): move to eval/executor
-
/// Get an option value
///
/// @param[in,out] arg Points to the '&' or '+' before the option name. Is
@@ -3974,8 +3940,6 @@ char *partial_name(partial_T *pt)
return (char *)pt->pt_func->uf_name;
}
-// TODO(ZyX-I): Move to eval/typval.h
-
static void partial_free(partial_T *pt)
{
for (int i = 0; i < pt->pt_argc; i++) {
@@ -3992,8 +3956,6 @@ static void partial_free(partial_T *pt)
xfree(pt);
}
-// TODO(ZyX-I): Move to eval/typval.h
-
/// Unreference a closure: decrement the reference count and free it when it
/// becomes zero.
void partial_unref(partial_T *pt)
diff --git a/src/nvim/eval/userfunc.c b/src/nvim/eval/userfunc.c
index ae867cb716..42f78422cb 100644
--- a/src/nvim/eval/userfunc.c
+++ b/src/nvim/eval/userfunc.c
@@ -2960,8 +2960,6 @@ void ex_return(exarg_T *eap)
}
}
-// TODO(ZyX-I): move to eval/ex_cmds
-
/// ":1,25call func(arg1, arg2)" function call.
void ex_call(exarg_T *eap)
{
diff --git a/src/nvim/eval/vars.c b/src/nvim/eval/vars.c
index 54ff0a53d3..733bc3ac2d 100644
--- a/src/nvim/eval/vars.c
+++ b/src/nvim/eval/vars.c
@@ -558,8 +558,6 @@ static const char *list_arg_vars(exarg_T *eap, const char *arg, int *first)
return arg;
}
-// TODO(ZyX-I): move to eval/ex_cmds
-
/// Set one item of `:let var = expr` or `:let [v1, v2] = list` to its value
///
/// @param[in] arg Start of the variable name.
@@ -769,8 +767,6 @@ void ex_unlet(exarg_T *eap)
ex_unletlock(eap, eap->arg, 0, do_unlet_var);
}
-// TODO(ZyX-I): move to eval/ex_cmds
-
/// ":lockvar" and ":unlockvar" commands
void ex_lockvar(exarg_T *eap)
{
@@ -787,8 +783,6 @@ void ex_lockvar(exarg_T *eap)
ex_unletlock(eap, arg, deep, do_lock_var);
}
-// TODO(ZyX-I): move to eval/ex_cmds
-
/// Common parsing logic for :unlet, :lockvar and :unlockvar.
///
/// Invokes `callback` afterwards if successful and `eap->skip == false`.
@@ -853,8 +847,6 @@ static void ex_unletlock(exarg_T *eap, char *argstart, int deep, ex_unletlock_ca
eap->nextcmd = check_nextcmd(arg);
}
-// TODO(ZyX-I): move to eval/ex_cmds
-
/// Unlet a variable indicated by `lp`.
///
/// @param[in] lp The lvalue.
@@ -944,8 +936,6 @@ static int do_unlet_var(lval_T *lp, char *name_end, exarg_T *eap, int deep FUNC_
return ret;
}
-// TODO(ZyX-I): move to eval/ex_cmds
-
/// unlet a variable
///
/// @param[in] name Variable name to unlet.
@@ -1016,8 +1006,6 @@ int do_unlet(const char *const name, const size_t name_len, const bool forceit)
return FAIL;
}
-// TODO(ZyX-I): move to eval/ex_cmds
-
/// Lock or unlock variable indicated by `lp`.
///
/// Locks if `eap->cmdidx == CMD_lockvar`, unlocks otherwise.
@@ -1463,8 +1451,6 @@ bool var_check_fixed(const int flags, const char *name, size_t name_len)
return false;
}
-// TODO(ZyX-I): move to eval/expressions
-
/// Check if name is a valid name to assign funcref to
///
/// @param[in] name Possible function/funcref name.
@@ -1493,8 +1479,6 @@ bool var_wrong_func_name(const char *const name, const bool new_var)
return false;
}
-// TODO(ZyX-I): move to eval/expressions
-
/// Check if a variable name is valid
///
/// @param[in] varname Variable name to check.
diff --git a/src/nvim/ex_eval.c b/src/nvim/ex_eval.c
index 781b2f7011..db0b20036f 100644
--- a/src/nvim/ex_eval.c
+++ b/src/nvim/ex_eval.c
@@ -1,8 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
-// TODO(ZyX-I): move to eval/executor
-
/// @file ex_eval.c
///
/// Functions for Ex command line for the +eval feature.