diff options
Diffstat (limited to 'src/nvim/eval.h')
-rw-r--r-- | src/nvim/eval.h | 61 |
1 files changed, 18 insertions, 43 deletions
diff --git a/src/nvim/eval.h b/src/nvim/eval.h index 1fc2891917..d83af70ef7 100644 --- a/src/nvim/eval.h +++ b/src/nvim/eval.h @@ -4,17 +4,22 @@ #include <stddef.h> #include <stdint.h> -#include "nvim/buffer_defs.h" -#include "nvim/channel.h" -#include "nvim/cmdexpand_defs.h" +#include "nvim/channel_defs.h" // IWYU pragma: keep +#include "nvim/cmdexpand_defs.h" // IWYU pragma: keep #include "nvim/eval/typval_defs.h" -#include "nvim/event/time.h" -#include "nvim/ex_cmds_defs.h" -#include "nvim/globals.h" +#include "nvim/eval_defs.h" // IWYU pragma: keep +#include "nvim/event/defs.h" +#include "nvim/ex_cmds_defs.h" // IWYU pragma: keep +#include "nvim/grid_defs.h" // IWYU pragma: keep #include "nvim/hashtab_defs.h" #include "nvim/macros_defs.h" -#include "nvim/os/fileio.h" -#include "nvim/os/stdpaths_defs.h" +#include "nvim/mbyte_defs.h" // IWYU pragma: keep +#include "nvim/msgpack_rpc/channel_defs.h" // IWYU pragma: keep +#include "nvim/option_defs.h" // IWYU pragma: keep +#include "nvim/os/fileio_defs.h" // IWYU pragma: keep +#include "nvim/os/stdpaths_defs.h" // IWYU pragma: keep +#include "nvim/types_defs.h" // IWYU pragma: keep +#include "nvim/vim_defs.h" // IWYU pragma: keep #define COPYID_INC 2 #define COPYID_MASK (~0x1) @@ -44,7 +49,7 @@ // "exp_name" NULL or non-NULL, to be freed later. // "tv" points to the Dictionary typval_T // "newkey" is the key for the new item. -typedef struct lval_S { +typedef struct { const char *ll_name; ///< Start of variable name (can be NULL). size_t ll_name_len; ///< Length of the .ll_name. char *ll_exp_name; ///< NULL or expanded name in allocated memory. @@ -81,6 +86,7 @@ typedef enum { VV_THIS_SESSION, VV_VERSION, VV_LNUM, + VV_TERMREQUEST, VV_TERMRESPONSE, VV_FNAME, VV_LANG, @@ -173,24 +179,8 @@ typedef enum { VV_VIRTNUM, } VimVarIndex; -/// All recognized msgpack types -typedef enum { - kMPNil, - kMPBoolean, - kMPInteger, - kMPFloat, - kMPString, - kMPBinary, - kMPArray, - kMPMap, - kMPExt, -} MessagePackType; -#define LAST_MSGPACK_TYPE kMPExt - /// Array mapping values from MessagePackType to corresponding list pointers -extern const list_T *eval_msgpack_type_lists[LAST_MSGPACK_TYPE + 1]; - -#undef LAST_MSGPACK_TYPE +extern const list_T *eval_msgpack_type_lists[NUM_MSGPACK_TYPES]; // Struct passed to get_v_event() and restore_v_event(). typedef struct { @@ -254,32 +244,17 @@ typedef enum { kDictListItems, ///< List dictionary contents: [keys, values]. } DictListType; -typedef int (*ex_unletlock_callback)(lval_T *, char *, exarg_T *, int); - // Used for checking if local variables or arguments used in a lambda. extern bool *eval_lavars_used; -/// Struct passed through eval() functions. -/// See EVALARG_EVALUATE for a fixed value with eval_flags set to EVAL_EVALUATE. -typedef struct { - int eval_flags; ///< EVAL_ flag values below - - /// copied from exarg_T when "getline" is "getsourceline". Can be NULL. - LineGetter eval_getline; - void *eval_cookie; ///< argument for eval_getline() - - /// pointer to the last line obtained with getsourceline() - char *eval_tofree; -} evalarg_T; +// Character used as separated in autoload function/variable names. +#define AUTOLOAD_CHAR '#' /// Flag for expression evaluation. enum { EVAL_EVALUATE = 1, ///< when missing don't actually evaluate }; -// Character used as separated in autoload function/variable names. -#define AUTOLOAD_CHAR '#' - /// Passed to an eval() function to enable evaluation. EXTERN evalarg_T EVALARG_EVALUATE INIT( = { EVAL_EVALUATE, NULL, NULL, NULL }); |