diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2023-11-29 22:39:54 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2023-11-29 22:39:54 +0000 |
commit | 21cb7d04c387e4198ca8098a884c78b56ffcf4c2 (patch) | |
tree | 84fe5690df1551f0bb2bdfe1a13aacd29ebc1de7 /src/nvim/eval.h | |
parent | d9c904f85a23a496df4eb6be42aa43f007b22d50 (diff) | |
parent | 4a8bf24ac690004aedf5540fa440e788459e5e34 (diff) | |
download | rneovim-colorcolchar.tar.gz rneovim-colorcolchar.tar.bz2 rneovim-colorcolchar.zip |
Merge remote-tracking branch 'upstream/master' into colorcolcharcolorcolchar
Diffstat (limited to 'src/nvim/eval.h')
-rw-r--r-- | src/nvim/eval.h | 53 |
1 files changed, 35 insertions, 18 deletions
diff --git a/src/nvim/eval.h b/src/nvim/eval.h index 86bc76e793..1fc2891917 100644 --- a/src/nvim/eval.h +++ b/src/nvim/eval.h @@ -1,15 +1,18 @@ -#ifndef NVIM_EVAL_H -#define NVIM_EVAL_H +#pragma once #include <stdbool.h> #include <stddef.h> +#include <stdint.h> #include "nvim/buffer_defs.h" #include "nvim/channel.h" +#include "nvim/cmdexpand_defs.h" #include "nvim/eval/typval_defs.h" #include "nvim/event/time.h" #include "nvim/ex_cmds_defs.h" -#include "nvim/hashtab.h" +#include "nvim/globals.h" +#include "nvim/hashtab_defs.h" +#include "nvim/macros_defs.h" #include "nvim/os/fileio.h" #include "nvim/os/stdpaths_defs.h" @@ -51,11 +54,11 @@ typedef struct lval_S { list_T *ll_list; ///< The list or NULL. bool ll_range; ///< true when a [i:j] range was used. bool ll_empty2; ///< Second index is empty: [i:]. - long ll_n1; ///< First index for list. - long ll_n2; ///< Second index for list range. + int ll_n1; ///< First index for list. + int ll_n2; ///< Second index for list range. dict_T *ll_dict; ///< The Dictionary or NULL. dictitem_T *ll_di; ///< The dictitem or NULL. - char *ll_newkey; ///< New key for Dict in allocated memory or NULL. + char *ll_newkey; ///< New key for Dict in allocated memory or NULL. blob_T *ll_blob; ///< The Blob or NULL. } lval_T; @@ -157,6 +160,7 @@ typedef enum { VV_ARGV, VV_COLLATE, VV_EXITING, + VV_MAXCOL, // Nvim VV_STDERR, VV_MSGPACK_TYPES, @@ -222,22 +226,12 @@ typedef struct { int repeat_count; int refcount; int emsg_count; ///< Errors in a repeating timer. - long timeout; + int64_t timeout; bool stopped; bool paused; Callback callback; } timer_T; -/// Type of assert_* check being performed -typedef enum { - ASSERT_EQUAL, - ASSERT_NOTEQUAL, - ASSERT_MATCH, - ASSERT_NOTMATCH, - ASSERT_INRANGE, - ASSERT_OTHER, -} assert_type_T; - /// types for expressions. typedef enum { EXPR_UNKNOWN = 0, @@ -265,7 +259,30 @@ 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; + +/// 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 }); + #ifdef INCLUDE_GENERATED_DECLARATIONS # include "eval.h.generated.h" #endif -#endif // NVIM_EVAL_H |