diff options
Diffstat (limited to 'src/nvim/eval.h')
-rw-r--r-- | src/nvim/eval.h | 260 |
1 files changed, 130 insertions, 130 deletions
diff --git a/src/nvim/eval.h b/src/nvim/eval.h index 2452a0a8c8..3d656656de 100644 --- a/src/nvim/eval.h +++ b/src/nvim/eval.h @@ -3,7 +3,7 @@ #include "nvim/buffer_defs.h" #include "nvim/channel.h" -#include "nvim/eval/funcs.h" // For FunPtr +#include "nvim/eval/funcs.h" // For FunPtr #include "nvim/event/time.h" // For TimeWatcher #include "nvim/ex_cmds_defs.h" // For exarg_T #include "nvim/os/fileio.h" // For FileDescriptor @@ -24,46 +24,46 @@ EXTERN ufunc_T dumuf; /* * Structure returned by get_lval() and used by set_var_lval(). * For a plain name: - * "name" points to the variable name. - * "exp_name" is NULL. - * "tv" is NULL + * "name" points to the variable name. + * "exp_name" is NULL. + * "tv" is NULL * For a magic braces name: - * "name" points to the expanded variable name. - * "exp_name" is non-NULL, to be freed later. - * "tv" is NULL + * "name" points to the expanded variable name. + * "exp_name" is non-NULL, to be freed later. + * "tv" is NULL * For an index in a list: - * "name" points to the (expanded) variable name. - * "exp_name" NULL or non-NULL, to be freed later. - * "tv" points to the (first) list item value - * "li" points to the (first) list item - * "range", "n1", "n2" and "empty2" indicate what items are used. + * "name" points to the (expanded) variable name. + * "exp_name" NULL or non-NULL, to be freed later. + * "tv" points to the (first) list item value + * "li" points to the (first) list item + * "range", "n1", "n2" and "empty2" indicate what items are used. * For an existing Dict item: - * "name" points to the (expanded) variable name. - * "exp_name" NULL or non-NULL, to be freed later. - * "tv" points to the dict item value - * "newkey" is NULL + * "name" points to the (expanded) variable name. + * "exp_name" NULL or non-NULL, to be freed later. + * "tv" points to the dict item value + * "newkey" is NULL * For a non-existing Dict item: - * "name" points to the (expanded) variable name. - * "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. + * "name" points to the (expanded) variable name. + * "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 { - 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. - typval_T *ll_tv; ///< Typeval of item being used. If "newkey" - ///< isn't NULL it's the Dict to which to add the item. - listitem_T *ll_li; ///< The list item or NULL. - 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. - dict_T *ll_dict; ///< The Dictionary or NULL. - dictitem_T *ll_di; ///< The dictitem or NULL. - char_u *ll_newkey; ///< New key for Dict in allocated memory or NULL. - blob_T *ll_blob; ///< The Blob or NULL. + 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. + typval_T *ll_tv; ///< Typeval of item being used. If "newkey" + ///< isn't NULL it's the Dict to which to add the item. + listitem_T *ll_li; ///< The list item or NULL. + 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. + dict_T *ll_dict; ///< The Dictionary or NULL. + dictitem_T *ll_di; ///< The dictitem or NULL. + char_u *ll_newkey; ///< New key for Dict in allocated memory or NULL. + blob_T *ll_blob; ///< The Blob or NULL. } lval_T; /// enum used by var_flavour() @@ -75,100 +75,100 @@ typedef enum { /// Defines for Vim variables typedef enum { - VV_COUNT, - VV_COUNT1, - VV_PREVCOUNT, - VV_ERRMSG, - VV_WARNINGMSG, - VV_STATUSMSG, - VV_SHELL_ERROR, - VV_THIS_SESSION, - VV_VERSION, - VV_LNUM, - VV_TERMRESPONSE, - VV_FNAME, - VV_LANG, - VV_LC_TIME, - VV_CTYPE, - VV_CC_FROM, - VV_CC_TO, - VV_FNAME_IN, - VV_FNAME_OUT, - VV_FNAME_NEW, - VV_FNAME_DIFF, - VV_CMDARG, - VV_FOLDSTART, - VV_FOLDEND, - VV_FOLDDASHES, - VV_FOLDLEVEL, - VV_PROGNAME, - VV_SEND_SERVER, - VV_DYING, - VV_EXCEPTION, - VV_THROWPOINT, - VV_REG, - VV_CMDBANG, - VV_INSERTMODE, - VV_VAL, - VV_KEY, - VV_PROFILING, - VV_FCS_REASON, - VV_FCS_CHOICE, - VV_BEVAL_BUFNR, - VV_BEVAL_WINNR, - VV_BEVAL_WINID, - VV_BEVAL_LNUM, - VV_BEVAL_COL, - VV_BEVAL_TEXT, - VV_SCROLLSTART, - VV_SWAPNAME, - VV_SWAPCHOICE, - VV_SWAPCOMMAND, - VV_CHAR, - VV_MOUSE_WIN, - VV_MOUSE_WINID, - VV_MOUSE_LNUM, - VV_MOUSE_COL, - VV_OP, - VV_SEARCHFORWARD, - VV_HLSEARCH, - VV_OLDFILES, - VV_WINDOWID, - VV_PROGPATH, - VV_COMPLETED_ITEM, - VV_OPTION_NEW, - VV_OPTION_OLD, - VV_OPTION_TYPE, - VV_ERRORS, - VV_FALSE, - VV_TRUE, - VV_NULL, - VV_NUMBERMAX, - VV_NUMBERMIN, - VV_NUMBERSIZE, - VV_VIM_DID_ENTER, - VV_TESTING, - VV_TYPE_NUMBER, - VV_TYPE_STRING, - VV_TYPE_FUNC, - VV_TYPE_LIST, - VV_TYPE_DICT, - VV_TYPE_FLOAT, - VV_TYPE_BOOL, - VV_TYPE_BLOB, - VV_EVENT, - VV_ECHOSPACE, - VV_ARGV, - VV_COLLATE, - VV_EXITING, - // Neovim - VV_STDERR, - VV_MSGPACK_TYPES, - VV__NULL_STRING, // String with NULL value. For test purposes only. - VV__NULL_LIST, // List with NULL value. For test purposes only. - VV__NULL_DICT, // Dictionary with NULL value. For test purposes only. - VV__NULL_BLOB, // Blob with NULL value. For test purposes only. - VV_LUA, + VV_COUNT, + VV_COUNT1, + VV_PREVCOUNT, + VV_ERRMSG, + VV_WARNINGMSG, + VV_STATUSMSG, + VV_SHELL_ERROR, + VV_THIS_SESSION, + VV_VERSION, + VV_LNUM, + VV_TERMRESPONSE, + VV_FNAME, + VV_LANG, + VV_LC_TIME, + VV_CTYPE, + VV_CC_FROM, + VV_CC_TO, + VV_FNAME_IN, + VV_FNAME_OUT, + VV_FNAME_NEW, + VV_FNAME_DIFF, + VV_CMDARG, + VV_FOLDSTART, + VV_FOLDEND, + VV_FOLDDASHES, + VV_FOLDLEVEL, + VV_PROGNAME, + VV_SEND_SERVER, + VV_DYING, + VV_EXCEPTION, + VV_THROWPOINT, + VV_REG, + VV_CMDBANG, + VV_INSERTMODE, + VV_VAL, + VV_KEY, + VV_PROFILING, + VV_FCS_REASON, + VV_FCS_CHOICE, + VV_BEVAL_BUFNR, + VV_BEVAL_WINNR, + VV_BEVAL_WINID, + VV_BEVAL_LNUM, + VV_BEVAL_COL, + VV_BEVAL_TEXT, + VV_SCROLLSTART, + VV_SWAPNAME, + VV_SWAPCHOICE, + VV_SWAPCOMMAND, + VV_CHAR, + VV_MOUSE_WIN, + VV_MOUSE_WINID, + VV_MOUSE_LNUM, + VV_MOUSE_COL, + VV_OP, + VV_SEARCHFORWARD, + VV_HLSEARCH, + VV_OLDFILES, + VV_WINDOWID, + VV_PROGPATH, + VV_COMPLETED_ITEM, + VV_OPTION_NEW, + VV_OPTION_OLD, + VV_OPTION_TYPE, + VV_ERRORS, + VV_FALSE, + VV_TRUE, + VV_NULL, + VV_NUMBERMAX, + VV_NUMBERMIN, + VV_NUMBERSIZE, + VV_VIM_DID_ENTER, + VV_TESTING, + VV_TYPE_NUMBER, + VV_TYPE_STRING, + VV_TYPE_FUNC, + VV_TYPE_LIST, + VV_TYPE_DICT, + VV_TYPE_FLOAT, + VV_TYPE_BOOL, + VV_TYPE_BLOB, + VV_EVENT, + VV_ECHOSPACE, + VV_ARGV, + VV_COLLATE, + VV_EXITING, + // Neovim + VV_STDERR, + VV_MSGPACK_TYPES, + VV__NULL_STRING, // String with NULL value. For test purposes only. + VV__NULL_LIST, // List with NULL value. For test purposes only. + VV__NULL_DICT, // Dictionary with NULL value. For test purposes only. + VV__NULL_BLOB, // Blob with NULL value. For test purposes only. + VV_LUA, } VimVarIndex; /// All recognized msgpack types @@ -208,7 +208,7 @@ typedef enum { } GetLvalFlags; /// flags for find_name_end() -#define FNE_INCL_BR 1 /* find_name_end(): include [] in name */ +#define FNE_INCL_BR 1 // find_name_end(): include [] in name #define FNE_CHECK_START 2 /* find_name_end(): check name starts with valid character */ |