diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-06-07 14:50:50 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-06-07 14:50:50 +0200 |
commit | a9c010494767e43a51c443cac35ebc80d0831d0b (patch) | |
tree | 9997eec6cd7eb6da640de26c0ab5d6637ccbbcce /src/proto | |
parent | e928366de5deca359fad779a4f740db703296302 (diff) | |
download | vim-git-a9c010494767e43a51c443cac35ebc80d0831d0b.tar.gz |
patch 8.2.0918: duplicate code for evaluating expression argumentv8.2.0918
Problem: Duplicate code for evaluating expression argument.
Solution: Merge the code and make the use more flexible.
Diffstat (limited to 'src/proto')
-rw-r--r-- | src/proto/eval.pro | 9 | ||||
-rw-r--r-- | src/proto/evalvars.pro | 5 |
2 files changed, 5 insertions, 9 deletions
diff --git a/src/proto/eval.pro b/src/proto/eval.pro index 983309948..57dd8387c 100644 --- a/src/proto/eval.pro +++ b/src/proto/eval.pro @@ -4,6 +4,7 @@ varnumber_T num_modulus(varnumber_T n1, varnumber_T n2); void eval_init(void); void eval_clear(void); int eval_to_bool(char_u *arg, int *error, char_u **nextcmd, int skip); +int eval_expr_valid_arg(typval_T *tv); int eval_expr_typval(typval_T *expr, typval_T *argv, int argc, typval_T *rettv); int eval_expr_to_bool(typval_T *expr, int *error); char_u *eval_to_string_skip(char_u *arg, char_u **nextcmd, int skip); @@ -19,14 +20,14 @@ void *call_func_retlist(char_u *func, int argc, typval_T *argv); int eval_foldexpr(char_u *arg, int *cp); char_u *get_lval(char_u *name, typval_T *rettv, lval_T *lp, int unlet, int skip, int flags, int fne_flags); void clear_lval(lval_T *lp); -void set_var_lval(lval_T *lp, char_u *endp, typval_T *rettv, int copy, int is_const, char_u *op); +void set_var_lval(lval_T *lp, char_u *endp, typval_T *rettv, int copy, int flags, char_u *op); void *eval_for_line(char_u *arg, int *errp, char_u **nextcmdp, int skip); int next_for_item(void *fi_void, char_u *arg); void free_for_info(void *fi_void); void set_context_for_expression(expand_T *xp, char_u *arg, cmdidx_T cmdidx); int pattern_match(char_u *pat, char_u *text, int ic); -int eval0(char_u *arg, typval_T *rettv, char_u **nextcmd, int evaluate); -int eval1(char_u **arg, typval_T *rettv, int evaluate); +int eval0(char_u *arg, typval_T *rettv, char_u **nextcmd, int flags); +int eval1(char_u **arg, typval_T *rettv, int flags); void eval_addblob(typval_T *tv1, typval_T *tv2); int eval_addlist(typval_T *tv1, typval_T *tv2); char_u *partial_name(partial_T *pt); @@ -50,7 +51,7 @@ int get_name_len(char_u **arg, char_u **alias, int evaluate, int verbose); char_u *find_name_end(char_u *arg, char_u **expr_start, char_u **expr_end, int flags); int eval_isnamec(int c); int eval_isnamec1(int c); -int handle_subscript(char_u **arg, typval_T *rettv, int evaluate, int verbose, char_u *start_leader, char_u **end_leaderp); +int handle_subscript(char_u **arg, typval_T *rettv, int flags, int verbose, char_u *start_leader, char_u **end_leaderp); int item_copy(typval_T *from, typval_T *to, int deep, int copyID); void echo_one(typval_T *rettv, int with_space, int *atstart, int *needclr); void ex_echo(exarg_T *eap); diff --git a/src/proto/evalvars.pro b/src/proto/evalvars.pro index 79f75646d..97641b5ab 100644 --- a/src/proto/evalvars.pro +++ b/src/proto/evalvars.pro @@ -88,9 +88,4 @@ callback_T get_callback(typval_T *arg); void put_callback(callback_T *cb, typval_T *tv); void set_callback(callback_T *dest, callback_T *src); void free_callback(callback_T *callback); -int evalarg_get(typval_T *tv, evalarg_T *eva); -int evalarg_valid(evalarg_T *eva); -int evalarg_call(evalarg_T *eva, typval_T *tv); -int evalarg_call_bool(evalarg_T *eva, int *error); -void evalarg_clean(evalarg_T *eva); /* vim: set ft=c : */ |