diff options
Diffstat (limited to 'src/nvim/eval.h')
-rw-r--r-- | src/nvim/eval.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/nvim/eval.h b/src/nvim/eval.h index aa034cb2b3..e9cdb108a8 100644 --- a/src/nvim/eval.h +++ b/src/nvim/eval.h @@ -266,6 +266,27 @@ 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 +}; + +/// 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 |