Mercurial > vim
annotate src/proto/eval.pro @ 22137:faaf88167b58 v8.2.1618
patch 8.2.1618: Vim9: cannot pass "true" to setloclist()
Commit: https://github.com/vim/vim/commit/401f0c07982247cc6d1cd22be08b05c44f7fd040
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Sep 5 22:37:39 2020 +0200
patch 8.2.1618: Vim9: cannot pass "true" to setloclist()
Problem: Vim9: cannot pass "true" to setloclist().
Solution: Use dict_get_bool(). (closes https://github.com/vim/vim/issues/6882)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 05 Sep 2020 22:45:03 +0200 |
parents | e3f9528bddda |
children | 80b4e604d1d5 |
rev | line source |
---|---|
7 | 1 /* eval.c */ |
17873
d50a5faa75bd
patch 8.1.1933: the eval.c file is too big
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
2 varnumber_T num_divide(varnumber_T n1, varnumber_T n2); |
d50a5faa75bd
patch 8.1.1933: the eval.c file is too big
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
3 varnumber_T num_modulus(varnumber_T n1, varnumber_T n2); |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6935
diff
changeset
|
4 void eval_init(void); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6935
diff
changeset
|
5 void eval_clear(void); |
21118
b0baa80cb53f
patch 8.2.1110: Vim9: line continuation does not work in function arguments
Bram Moolenaar <Bram@vim.org>
parents:
21058
diff
changeset
|
6 void fill_evalarg_from_eap(evalarg_T *evalarg, exarg_T *eap, int skip); |
20996
3af71cbcfdbe
patch 8.2.1049: Vim9: leaking memory when using continuation line
Bram Moolenaar <Bram@vim.org>
parents:
20992
diff
changeset
|
7 int eval_to_bool(char_u *arg, int *error, exarg_T *eap, int skip); |
20731
ab27db64f1fb
patch 8.2.0918: duplicate code for evaluating expression argument
Bram Moolenaar <Bram@vim.org>
parents:
20587
diff
changeset
|
8 int eval_expr_valid_arg(typval_T *tv); |
16231
0761a4c111a7
patch 8.1.1120: cannot easily get directory entry matches
Bram Moolenaar <Bram@vim.org>
parents:
15780
diff
changeset
|
9 int eval_expr_typval(typval_T *expr, typval_T *argv, int argc, typval_T *rettv); |
12722
7749260f261c
patch 8.0.1239: cannot use a lambda for the skip argument to searchpair()
Christian Brabandt <cb@256bit.org>
parents:
11181
diff
changeset
|
10 int eval_expr_to_bool(typval_T *expr, int *error); |
20996
3af71cbcfdbe
patch 8.2.1049: Vim9: leaking memory when using continuation line
Bram Moolenaar <Bram@vim.org>
parents:
20992
diff
changeset
|
11 char_u *eval_to_string_skip(char_u *arg, exarg_T *eap, int skip); |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6935
diff
changeset
|
12 int skip_expr(char_u **pp); |
21220
ad13736a1783
patch 8.2.1161: Vim9: using freed memory
Bram Moolenaar <Bram@vim.org>
parents:
21148
diff
changeset
|
13 int skip_expr_concatenate(char_u **arg, char_u **start, char_u **end, evalarg_T *evalarg); |
20996
3af71cbcfdbe
patch 8.2.1049: Vim9: leaking memory when using continuation line
Bram Moolenaar <Bram@vim.org>
parents:
20992
diff
changeset
|
14 char_u *eval_to_string(char_u *arg, int convert); |
3af71cbcfdbe
patch 8.2.1049: Vim9: leaking memory when using continuation line
Bram Moolenaar <Bram@vim.org>
parents:
20992
diff
changeset
|
15 char_u *eval_to_string_safe(char_u *arg, int use_sandbox); |
9389
32e34e574716
commit https://github.com/vim/vim/commit/22fcfad29276bd5f317faf516637dcd491b96a12
Christian Brabandt <cb@256bit.org>
parents:
8889
diff
changeset
|
16 varnumber_T eval_to_number(char_u *expr); |
20996
3af71cbcfdbe
patch 8.2.1049: Vim9: leaking memory when using continuation line
Bram Moolenaar <Bram@vim.org>
parents:
20992
diff
changeset
|
17 typval_T *eval_expr(char_u *arg, exarg_T *eap); |
14439
e4c553e9132b
patch 8.1.0233: "safe" argument of call_vim_function() is always FALSE
Christian Brabandt <cb@256bit.org>
parents:
14393
diff
changeset
|
18 int call_vim_function(char_u *func, int argc, typval_T *argv, typval_T *rettv); |
e4c553e9132b
patch 8.1.0233: "safe" argument of call_vim_function() is always FALSE
Christian Brabandt <cb@256bit.org>
parents:
14393
diff
changeset
|
19 varnumber_T call_func_retnr(char_u *func, int argc, typval_T *argv); |
e4c553e9132b
patch 8.1.0233: "safe" argument of call_vim_function() is always FALSE
Christian Brabandt <cb@256bit.org>
parents:
14393
diff
changeset
|
20 void *call_func_retstr(char_u *func, int argc, typval_T *argv); |
e4c553e9132b
patch 8.1.0233: "safe" argument of call_vim_function() is always FALSE
Christian Brabandt <cb@256bit.org>
parents:
14393
diff
changeset
|
21 void *call_func_retlist(char_u *func, int argc, typval_T *argv); |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6935
diff
changeset
|
22 int eval_foldexpr(char_u *arg, int *cp); |
9562
86af4a48c00a
commit https://github.com/vim/vim/commit/a9b579f3d7463720a316e11e77a7a9fbb9267986
Christian Brabandt <cb@256bit.org>
parents:
9560
diff
changeset
|
23 char_u *get_lval(char_u *name, typval_T *rettv, lval_T *lp, int unlet, int skip, int flags, int fne_flags); |
86af4a48c00a
commit https://github.com/vim/vim/commit/a9b579f3d7463720a316e11e77a7a9fbb9267986
Christian Brabandt <cb@256bit.org>
parents:
9560
diff
changeset
|
24 void clear_lval(lval_T *lp); |
20731
ab27db64f1fb
patch 8.2.0918: duplicate code for evaluating expression argument
Bram Moolenaar <Bram@vim.org>
parents:
20587
diff
changeset
|
25 void set_var_lval(lval_T *lp, char_u *endp, typval_T *rettv, int copy, int flags, char_u *op); |
21058
111f877e63d9
patch 8.2.1080: Vim9: no line break allowed in a for loop
Bram Moolenaar <Bram@vim.org>
parents:
21050
diff
changeset
|
26 void *eval_for_line(char_u *arg, int *errp, exarg_T *eap, evalarg_T *evalarg); |
111f877e63d9
patch 8.2.1080: Vim9: no line break allowed in a for loop
Bram Moolenaar <Bram@vim.org>
parents:
21050
diff
changeset
|
27 void skip_for_lines(void *fi_void, evalarg_T *evalarg); |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6935
diff
changeset
|
28 int next_for_item(void *fi_void, char_u *arg); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6935
diff
changeset
|
29 void free_for_info(void *fi_void); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6935
diff
changeset
|
30 void set_context_for_expression(expand_T *xp, char_u *arg, cmdidx_T cmdidx); |
17377
cb008de2a6ec
patch 8.1.1687: the evalfunc.c file is too big
Bram Moolenaar <Bram@vim.org>
parents:
17168
diff
changeset
|
31 int pattern_match(char_u *pat, char_u *text, int ic); |
21028
7acceb76669f
patch 8.2.1065: Vim9: no line break allowed inside a list
Bram Moolenaar <Bram@vim.org>
parents:
20996
diff
changeset
|
32 char_u *eval_next_non_blank(char_u *arg, evalarg_T *evalarg, int *getnext); |
7acceb76669f
patch 8.2.1065: Vim9: no line break allowed inside a list
Bram Moolenaar <Bram@vim.org>
parents:
20996
diff
changeset
|
33 char_u *eval_next_line(evalarg_T *evalarg); |
21046
0ca7e04d39e3
patch 8.2.1074: Vim9: no line break allowed after some operators
Bram Moolenaar <Bram@vim.org>
parents:
21040
diff
changeset
|
34 char_u *skipwhite_and_linebreak(char_u *arg, evalarg_T *evalarg); |
21050
7a9daf73a724
patch 8.2.1076: Vim9: no line break allowed in :if expression
Bram Moolenaar <Bram@vim.org>
parents:
21046
diff
changeset
|
35 void clear_evalarg(evalarg_T *evalarg, exarg_T *eap); |
20996
3af71cbcfdbe
patch 8.2.1049: Vim9: leaking memory when using continuation line
Bram Moolenaar <Bram@vim.org>
parents:
20992
diff
changeset
|
36 int eval0(char_u *arg, typval_T *rettv, exarg_T *eap, evalarg_T *evalarg); |
3af71cbcfdbe
patch 8.2.1049: Vim9: leaking memory when using continuation line
Bram Moolenaar <Bram@vim.org>
parents:
20992
diff
changeset
|
37 int eval1(char_u **arg, typval_T *rettv, evalarg_T *evalarg); |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
18966
diff
changeset
|
38 void eval_addblob(typval_T *tv1, typval_T *tv2); |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
18966
diff
changeset
|
39 int eval_addlist(typval_T *tv1, typval_T *tv2); |
21833
e3f9528bddda
patch 8.2.1466: Vim9: cannot index or slice a variable with type "any"
Bram Moolenaar <Bram@vim.org>
parents:
21826
diff
changeset
|
40 int check_can_index(typval_T *rettv, int evaluate, int verbose); |
e3f9528bddda
patch 8.2.1466: Vim9: cannot index or slice a variable with type "any"
Bram Moolenaar <Bram@vim.org>
parents:
21826
diff
changeset
|
41 int eval_index_inner(typval_T *rettv, int is_range, typval_T *var1, typval_T *var2, char_u *key, int keylen, int verbose); |
9723
80ac9cf77c9b
commit https://github.com/vim/vim/commit/437bafe4c8a83ed71ee006eda7f54b65a90f0d4c
Christian Brabandt <cb@256bit.org>
parents:
9686
diff
changeset
|
42 char_u *partial_name(partial_T *pt); |
8863
e1b84109506a
commit https://github.com/vim/vim/commit/107e1eef1df3b786ad3ad49fbdb9e058649303b5
Christian Brabandt <cb@256bit.org>
parents:
8577
diff
changeset
|
43 void partial_unref(partial_T *pt); |
7712
bce3b5ddb393
commit https://github.com/vim/vim/commit/520e1e41f35b063ede63b41738c82d6636e78c34
Christian Brabandt <cb@256bit.org>
parents:
7668
diff
changeset
|
44 int get_copyID(void); |
8881
ed0b39dd7fd6
commit https://github.com/vim/vim/commit/ebf7dfa6f121c82f97d2adca3d45fbaba9ad8f7e
Christian Brabandt <cb@256bit.org>
parents:
8863
diff
changeset
|
45 int garbage_collect(int testing); |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6935
diff
changeset
|
46 int set_ref_in_ht(hashtab_T *ht, int copyID, list_stack_T **list_stack); |
17168
1d30eb64a7a2
patch 8.1.1583: set_ref_in_list() only sets ref in items
Bram Moolenaar <Bram@vim.org>
parents:
17079
diff
changeset
|
47 int set_ref_in_dict(dict_T *d, int copyID); |
1d30eb64a7a2
patch 8.1.1583: set_ref_in_list() only sets ref in items
Bram Moolenaar <Bram@vim.org>
parents:
17079
diff
changeset
|
48 int set_ref_in_list(list_T *ll, int copyID); |
1d30eb64a7a2
patch 8.1.1583: set_ref_in_list() only sets ref in items
Bram Moolenaar <Bram@vim.org>
parents:
17079
diff
changeset
|
49 int set_ref_in_list_items(list_T *l, int copyID, ht_stack_T **ht_stack); |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6935
diff
changeset
|
50 int set_ref_in_item(typval_T *tv, int copyID, ht_stack_T **ht_stack, list_stack_T **list_stack); |
12722
7749260f261c
patch 8.0.1239: cannot use a lambda for the skip argument to searchpair()
Christian Brabandt <cb@256bit.org>
parents:
11181
diff
changeset
|
51 char_u *echo_string_core(typval_T *tv, char_u **tofree, char_u *numbuf, int copyID, int echo_style, int restore_copyID, int composite_val); |
9562
86af4a48c00a
commit https://github.com/vim/vim/commit/a9b579f3d7463720a316e11e77a7a9fbb9267986
Christian Brabandt <cb@256bit.org>
parents:
9560
diff
changeset
|
52 char_u *echo_string(typval_T *tv, char_u **tofree, char_u *numbuf, int copyID); |
9556
afaff1d283d3
commit https://github.com/vim/vim/commit/cd52459c387785796713826c63174cdeed295dd4
Christian Brabandt <cb@256bit.org>
parents:
9491
diff
changeset
|
53 char_u *string_quote(char_u *str, int function); |
7712
bce3b5ddb393
commit https://github.com/vim/vim/commit/520e1e41f35b063ede63b41738c82d6636e78c34
Christian Brabandt <cb@256bit.org>
parents:
7668
diff
changeset
|
54 int string2float(char_u *text, float_T *value); |
9571
5eaa708ab50d
commit https://github.com/vim/vim/commit/73dad1e64cb42842d8259cb1a255a6fa59822f76
Christian Brabandt <cb@256bit.org>
parents:
9562
diff
changeset
|
55 pos_T *var2fpos(typval_T *varp, int dollar_lnum, int *fnum); |
5eaa708ab50d
commit https://github.com/vim/vim/commit/73dad1e64cb42842d8259cb1a255a6fa59822f76
Christian Brabandt <cb@256bit.org>
parents:
9562
diff
changeset
|
56 int list2fpos(typval_T *arg, pos_T *posp, int *fnump, colnr_T *curswantp); |
17873
d50a5faa75bd
patch 8.1.1933: the eval.c file is too big
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
57 int get_env_len(char_u **arg); |
9562
86af4a48c00a
commit https://github.com/vim/vim/commit/a9b579f3d7463720a316e11e77a7a9fbb9267986
Christian Brabandt <cb@256bit.org>
parents:
9560
diff
changeset
|
58 int get_id_len(char_u **arg); |
17873
d50a5faa75bd
patch 8.1.1933: the eval.c file is too big
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
59 int get_name_len(char_u **arg, char_u **alias, int evaluate, int verbose); |
9562
86af4a48c00a
commit https://github.com/vim/vim/commit/a9b579f3d7463720a316e11e77a7a9fbb9267986
Christian Brabandt <cb@256bit.org>
parents:
9560
diff
changeset
|
60 char_u *find_name_end(char_u *arg, char_u **expr_start, char_u **expr_end, int flags); |
86af4a48c00a
commit https://github.com/vim/vim/commit/a9b579f3d7463720a316e11e77a7a9fbb9267986
Christian Brabandt <cb@256bit.org>
parents:
9560
diff
changeset
|
61 int eval_isnamec(int c); |
86af4a48c00a
commit https://github.com/vim/vim/commit/a9b579f3d7463720a316e11e77a7a9fbb9267986
Christian Brabandt <cb@256bit.org>
parents:
9560
diff
changeset
|
62 int eval_isnamec1(int c); |
21512
81c47a694479
patch 8.2.1306: checking for first character of dict key is inconsistent
Bram Moolenaar <Bram@vim.org>
parents:
21220
diff
changeset
|
63 int eval_isdictc(int c); |
21823
b1f3d8a44ab6
patch 8.2.1461: Vim9: string indexes are counted in bytes
Bram Moolenaar <Bram@vim.org>
parents:
21512
diff
changeset
|
64 char_u *char_from_string(char_u *str, varnumber_T index); |
21826
ccad66ac6c3e
patch 8.2.1462: Vim9: string slice not supported yet
Bram Moolenaar <Bram@vim.org>
parents:
21823
diff
changeset
|
65 char_u *string_slice(char_u *str, varnumber_T first, varnumber_T last); |
21040
d9e0db9b2b99
patch 8.2.1071: Vim9: no line break allowed inside a lambda
Bram Moolenaar <Bram@vim.org>
parents:
21032
diff
changeset
|
66 int handle_subscript(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int verbose); |
9556
afaff1d283d3
commit https://github.com/vim/vim/commit/cd52459c387785796713826c63174cdeed295dd4
Christian Brabandt <cb@256bit.org>
parents:
9491
diff
changeset
|
67 int item_copy(typval_T *from, typval_T *to, int deep, int copyID); |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
18966
diff
changeset
|
68 void echo_one(typval_T *rettv, int with_space, int *atstart, int *needclr); |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6935
diff
changeset
|
69 void ex_echo(exarg_T *eap); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6935
diff
changeset
|
70 void ex_echohl(exarg_T *eap); |
17922
4d63d47d87ef
patch 8.1.1957: more code can be moved to evalvars.c
Bram Moolenaar <Bram@vim.org>
parents:
17893
diff
changeset
|
71 int get_echo_attr(void); |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
6935
diff
changeset
|
72 void ex_execute(exarg_T *eap); |
17873
d50a5faa75bd
patch 8.1.1933: the eval.c file is too big
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
73 char_u *find_option_end(char_u **arg, int *opt_flags); |
14700
0a3b9ecf7cb8
patch 8.1.0362: cannot get the script line number when executing a function
Christian Brabandt <cb@256bit.org>
parents:
14439
diff
changeset
|
74 void last_set_msg(sctx_T script_ctx); |
9589
bf204ab1ce7d
commit https://github.com/vim/vim/commit/72ab729c3dcdea0fba44d8e676602c847e841bcd
Christian Brabandt <cb@256bit.org>
parents:
9571
diff
changeset
|
75 char_u *do_string_sub(char_u *str, char_u *pat, char_u *sub, typval_T *expr, char_u *flags); |
7 | 76 /* vim: set ft=c : */ |