diff options
author | Josh Rahm <rahm@google.com> | 2022-08-19 12:26:08 -0600 |
---|---|---|
committer | Josh Rahm <rahm@google.com> | 2022-08-19 13:06:41 -0600 |
commit | a7237662f96933efe29eed8212464571e3778cd0 (patch) | |
tree | 27930202726b4251437c8cfa53069f65b4db90dc /src/nvim/ex_eval.h | |
parent | 02292344929069ea63c0bb872cc22d552d86b67f (diff) | |
parent | b2f979b30beac67906b2dd717fcb6a34f46f5e54 (diff) | |
download | rneovim-tmp.tar.gz rneovim-tmp.tar.bz2 rneovim-tmp.zip |
Merge branch 'master' of https://github.com/neovim/neovim into rahmtmp
Diffstat (limited to 'src/nvim/ex_eval.h')
-rw-r--r-- | src/nvim/ex_eval.h | 76 |
1 files changed, 1 insertions, 75 deletions
diff --git a/src/nvim/ex_eval.h b/src/nvim/ex_eval.h index 235875fb91..9e3ac5e9c1 100644 --- a/src/nvim/ex_eval.h +++ b/src/nvim/ex_eval.h @@ -2,81 +2,7 @@ #define NVIM_EX_EVAL_H #include "nvim/ex_cmds_defs.h" // for exarg_T -#include "nvim/pos.h" // for linenr_T - -/* There is no CSF_IF, the lack of CSF_WHILE, CSF_FOR and CSF_TRY means ":if" - * was used. */ -#define CSF_TRUE 0x0001 // condition was TRUE -#define CSF_ACTIVE 0x0002 // current state is active -#define CSF_ELSE 0x0004 // ":else" has been passed -#define CSF_WHILE 0x0008 // is a ":while" -#define CSF_FOR 0x0010 // is a ":for" - -#define CSF_TRY 0x0100 // is a ":try" -#define CSF_FINALLY 0x0200 // ":finally" has been passed -#define CSF_THROWN 0x0800 // exception thrown to this try conditional -#define CSF_CAUGHT 0x1000 // exception caught by this try conditional -#define CSF_FINISHED 0x2000 // CSF_CAUGHT was handled by finish_exception() -#define CSF_SILENT 0x4000 // "emsg_silent" reset by ":try" -// Note that CSF_ELSE is only used when CSF_TRY and CSF_WHILE are unset -// (an ":if"), and CSF_SILENT is only used when CSF_TRY is set. - -/* - * What's pending for being reactivated at the ":endtry" of this try - * conditional: - */ -#define CSTP_NONE 0 // nothing pending in ":finally" clause -#define CSTP_ERROR 1 // an error is pending -#define CSTP_INTERRUPT 2 // an interrupt is pending -#define CSTP_THROW 4 // a throw is pending -#define CSTP_BREAK 8 // ":break" is pending -#define CSTP_CONTINUE 16 // ":continue" is pending -#define CSTP_RETURN 24 // ":return" is pending -#define CSTP_FINISH 32 // ":finish" is pending - -/* - * A list of error messages that can be converted to an exception. "throw_msg" - * is only set in the first element of the list. Usually, it points to the - * original message stored in that element, but sometimes it points to a later - * message in the list. See cause_errthrow() below. - */ -struct msglist { - char *msg; // original message - char *throw_msg; // msg to throw: usually original one - struct msglist *next; // next of several messages in a row -}; - -// The exception types. -typedef enum { - ET_USER, // exception caused by ":throw" command - ET_ERROR, // error exception - ET_INTERRUPT, // interrupt exception triggered by Ctrl-C -} except_type_T; - -/* - * Structure describing an exception. - * (don't use "struct exception", it's used by the math library). - */ -typedef struct vim_exception except_T; -struct vim_exception { - except_type_T type; // exception type - char *value; // exception value - struct msglist *messages; // message(s) causing error exception - char *throw_name; // name of the throw point - linenr_T throw_lnum; // line number of the throw point - except_T *caught; // next exception on the caught stack -}; - -/* - * Structure to save the error/interrupt/exception state between calls to - * enter_cleanup() and leave_cleanup(). Must be allocated as an automatic - * variable by the (common) caller of these functions. - */ -typedef struct cleanup_stuff cleanup_T; -struct cleanup_stuff { - int pending; // error/interrupt/exception state - except_T *exception; // exception value -}; +#include "nvim/ex_eval_defs.h" #ifdef INCLUDE_GENERATED_DECLARATIONS # include "ex_eval.h.generated.h" |