1 | // This file is part of SmallBASIC |
2 | // |
3 | // Evaluate code variables |
4 | // |
5 | // This program is distributed under the terms of the GPL v2.0 or later |
6 | // Download the GNU Public License (GPL) from www.gnu.org |
7 | // |
8 | // Copyright(C) 2010-2014 Chris Warren-Smith. [http://tinyurl.com/ja2ss] |
9 | |
10 | #ifndef VAR_EVAL_H |
11 | #define VAR_EVAL_H |
12 | |
13 | #if defined(__cplusplus) |
14 | extern "C" { |
15 | #endif |
16 | |
17 | /** |
18 | * @ingroup var |
19 | * |
20 | * prepares the self variable |
21 | */ |
22 | var_t *v_set_self(var_t *self); |
23 | |
24 | /** |
25 | * @ingroup var |
26 | * |
27 | * returns the map field along with the field parent |
28 | */ |
29 | var_t *code_getvarptr_map(var_t **map); |
30 | |
31 | /** |
32 | * @ingroup var |
33 | * |
34 | * resolve map |
35 | */ |
36 | var_t *code_resolve_map(var_t *var_p, int until_parens); |
37 | |
38 | /** |
39 | * @ingroup var |
40 | * |
41 | * resolve var pointer |
42 | */ |
43 | var_t *code_resolve_varptr(var_t *var_p, int until_parens); |
44 | |
45 | /** |
46 | * @ingroup var |
47 | * |
48 | * evaluate variable reference assignment |
49 | */ |
50 | var_t *eval_ref_var(var_t *var_p); |
51 | |
52 | /** |
53 | * @ingroup exec |
54 | * |
55 | * returns true if the next code is a single variable |
56 | * |
57 | * @return non-zero if the following code is a variable |
58 | */ |
59 | int code_isvar(void); |
60 | |
61 | /** |
62 | * @ingroup var |
63 | * |
64 | * populates the var to string from bytecode |
65 | * |
66 | * @param v is the variable |
67 | */ |
68 | void v_eval_str(var_p_t v); |
69 | |
70 | #if defined(__cplusplus) |
71 | } |
72 | #endif |
73 | |
74 | #endif |
75 | |
76 | |