Mercurial > vim
comparison src/proto/eval.pro @ 20731:ab27db64f1fb v8.2.0918
patch 8.2.0918: duplicate code for evaluating expression argument
Commit: https://github.com/vim/vim/commit/a9c010494767e43a51c443cac35ebc80d0831d0b
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jun 7 14:50:50 2020 +0200
patch 8.2.0918: duplicate code for evaluating expression argument
Problem: Duplicate code for evaluating expression argument.
Solution: Merge the code and make the use more flexible.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 07 Jun 2020 15:00:04 +0200 |
parents | f502455965c0 |
children | 7ee565134d4a |
comparison
equal
deleted
inserted
replaced
20730:6f44f49988ee | 20731:ab27db64f1fb |
---|---|
2 varnumber_T num_divide(varnumber_T n1, varnumber_T n2); | 2 varnumber_T num_divide(varnumber_T n1, varnumber_T n2); |
3 varnumber_T num_modulus(varnumber_T n1, varnumber_T n2); | 3 varnumber_T num_modulus(varnumber_T n1, varnumber_T n2); |
4 void eval_init(void); | 4 void eval_init(void); |
5 void eval_clear(void); | 5 void eval_clear(void); |
6 int eval_to_bool(char_u *arg, int *error, char_u **nextcmd, int skip); | 6 int eval_to_bool(char_u *arg, int *error, char_u **nextcmd, int skip); |
7 int eval_expr_valid_arg(typval_T *tv); | |
7 int eval_expr_typval(typval_T *expr, typval_T *argv, int argc, typval_T *rettv); | 8 int eval_expr_typval(typval_T *expr, typval_T *argv, int argc, typval_T *rettv); |
8 int eval_expr_to_bool(typval_T *expr, int *error); | 9 int eval_expr_to_bool(typval_T *expr, int *error); |
9 char_u *eval_to_string_skip(char_u *arg, char_u **nextcmd, int skip); | 10 char_u *eval_to_string_skip(char_u *arg, char_u **nextcmd, int skip); |
10 int skip_expr(char_u **pp); | 11 int skip_expr(char_u **pp); |
11 char_u *eval_to_string(char_u *arg, char_u **nextcmd, int convert); | 12 char_u *eval_to_string(char_u *arg, char_u **nextcmd, int convert); |
17 void *call_func_retstr(char_u *func, int argc, typval_T *argv); | 18 void *call_func_retstr(char_u *func, int argc, typval_T *argv); |
18 void *call_func_retlist(char_u *func, int argc, typval_T *argv); | 19 void *call_func_retlist(char_u *func, int argc, typval_T *argv); |
19 int eval_foldexpr(char_u *arg, int *cp); | 20 int eval_foldexpr(char_u *arg, int *cp); |
20 char_u *get_lval(char_u *name, typval_T *rettv, lval_T *lp, int unlet, int skip, int flags, int fne_flags); | 21 char_u *get_lval(char_u *name, typval_T *rettv, lval_T *lp, int unlet, int skip, int flags, int fne_flags); |
21 void clear_lval(lval_T *lp); | 22 void clear_lval(lval_T *lp); |
22 void set_var_lval(lval_T *lp, char_u *endp, typval_T *rettv, int copy, int is_const, char_u *op); | 23 void set_var_lval(lval_T *lp, char_u *endp, typval_T *rettv, int copy, int flags, char_u *op); |
23 void *eval_for_line(char_u *arg, int *errp, char_u **nextcmdp, int skip); | 24 void *eval_for_line(char_u *arg, int *errp, char_u **nextcmdp, int skip); |
24 int next_for_item(void *fi_void, char_u *arg); | 25 int next_for_item(void *fi_void, char_u *arg); |
25 void free_for_info(void *fi_void); | 26 void free_for_info(void *fi_void); |
26 void set_context_for_expression(expand_T *xp, char_u *arg, cmdidx_T cmdidx); | 27 void set_context_for_expression(expand_T *xp, char_u *arg, cmdidx_T cmdidx); |
27 int pattern_match(char_u *pat, char_u *text, int ic); | 28 int pattern_match(char_u *pat, char_u *text, int ic); |
28 int eval0(char_u *arg, typval_T *rettv, char_u **nextcmd, int evaluate); | 29 int eval0(char_u *arg, typval_T *rettv, char_u **nextcmd, int flags); |
29 int eval1(char_u **arg, typval_T *rettv, int evaluate); | 30 int eval1(char_u **arg, typval_T *rettv, int flags); |
30 void eval_addblob(typval_T *tv1, typval_T *tv2); | 31 void eval_addblob(typval_T *tv1, typval_T *tv2); |
31 int eval_addlist(typval_T *tv1, typval_T *tv2); | 32 int eval_addlist(typval_T *tv1, typval_T *tv2); |
32 char_u *partial_name(partial_T *pt); | 33 char_u *partial_name(partial_T *pt); |
33 void partial_unref(partial_T *pt); | 34 void partial_unref(partial_T *pt); |
34 int get_copyID(void); | 35 int get_copyID(void); |
48 int get_id_len(char_u **arg); | 49 int get_id_len(char_u **arg); |
49 int get_name_len(char_u **arg, char_u **alias, int evaluate, int verbose); | 50 int get_name_len(char_u **arg, char_u **alias, int evaluate, int verbose); |
50 char_u *find_name_end(char_u *arg, char_u **expr_start, char_u **expr_end, int flags); | 51 char_u *find_name_end(char_u *arg, char_u **expr_start, char_u **expr_end, int flags); |
51 int eval_isnamec(int c); | 52 int eval_isnamec(int c); |
52 int eval_isnamec1(int c); | 53 int eval_isnamec1(int c); |
53 int handle_subscript(char_u **arg, typval_T *rettv, int evaluate, int verbose, char_u *start_leader, char_u **end_leaderp); | 54 int handle_subscript(char_u **arg, typval_T *rettv, int flags, int verbose, char_u *start_leader, char_u **end_leaderp); |
54 int item_copy(typval_T *from, typval_T *to, int deep, int copyID); | 55 int item_copy(typval_T *from, typval_T *to, int deep, int copyID); |
55 void echo_one(typval_T *rettv, int with_space, int *atstart, int *needclr); | 56 void echo_one(typval_T *rettv, int with_space, int *atstart, int *needclr); |
56 void ex_echo(exarg_T *eap); | 57 void ex_echo(exarg_T *eap); |
57 void ex_echohl(exarg_T *eap); | 58 void ex_echohl(exarg_T *eap); |
58 int get_echo_attr(void); | 59 int get_echo_attr(void); |