mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.2.0013: not using a typedef for condstack
Problem: Not using a typedef for condstack.
Solution: Add a typedef.
ddef129160
This commit is contained in:
parent
fcd9105018
commit
9e6ebed6f4
@ -23652,7 +23652,7 @@ void ex_return(exarg_T *eap)
|
|||||||
int do_return(exarg_T *eap, int reanimate, int is_cmd, void *rettv)
|
int do_return(exarg_T *eap, int reanimate, int is_cmd, void *rettv)
|
||||||
{
|
{
|
||||||
int idx;
|
int idx;
|
||||||
struct condstack *cstack = eap->cstack;
|
cstack_T *const cstack = eap->cstack;
|
||||||
|
|
||||||
if (reanimate)
|
if (reanimate)
|
||||||
/* Undo the return. */
|
/* Undo the return. */
|
||||||
|
@ -12,31 +12,29 @@
|
|||||||
# include "ex_cmds_enum.generated.h"
|
# include "ex_cmds_enum.generated.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
// When adding an Ex command:
|
||||||
* When adding an Ex command:
|
// 1. Add an entry to the table in src/nvim/ex_cmds.lua. Keep it sorted on the
|
||||||
* 1. Add an entry to the table in src/nvim/ex_cmds.lua. Keep it sorted on the
|
// shortest version of the command name that works. If it doesn't start with
|
||||||
* shortest version of the command name that works. If it doesn't start with
|
// a lower case letter, add it at the end.
|
||||||
* a lower case letter, add it at the end.
|
//
|
||||||
*
|
// Each table entry is a table with the following keys:
|
||||||
* Each table entry is a table with the following keys:
|
//
|
||||||
*
|
// Key | Description
|
||||||
* Key | Description
|
// ------- | -------------------------------------------------------------
|
||||||
* ------- | -------------------------------------------------------------
|
// command | Name of the command. Required.
|
||||||
* command | Name of the command. Required.
|
// enum | Name of the enum entry. If not set defaults to CMD_{command}.
|
||||||
* enum | Name of the enum entry. If not set defaults to CMD_{command}.
|
// flags | A set of the flags from below list joined by bitwise or.
|
||||||
* flags | A set of the flags from below list joined by bitwise or.
|
// func | Name of the function containing the implementation.
|
||||||
* func | Name of the function containing the implementation.
|
//
|
||||||
*
|
// Referenced function should be either non-static one or defined in
|
||||||
* Referenced function should be either non-static one or defined in
|
// ex_docmd.c and be coercible to ex_func_T type from below.
|
||||||
* ex_docmd.c and be coercible to ex_func_T type from below.
|
//
|
||||||
*
|
// All keys not described in the above table are reserved for future use.
|
||||||
* All keys not described in the above table are reserved for future use.
|
//
|
||||||
*
|
// 2. Add a "case: CMD_xxx" in the big switch in ex_docmd.c.
|
||||||
* 2. Add a "case: CMD_xxx" in the big switch in ex_docmd.c.
|
// 3. Add an entry in the index for Ex commands at ":help ex-cmd-index".
|
||||||
* 3. Add an entry in the index for Ex commands at ":help ex-cmd-index".
|
// 4. Add documentation in ../doc/xxx.txt. Add a tag for both the short and
|
||||||
* 4. Add documentation in ../doc/xxx.txt. Add a tag for both the short and
|
// long name of the command.
|
||||||
* long name of the command.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define RANGE 0x001 /* allow a linespecs */
|
#define RANGE 0x001 /* allow a linespecs */
|
||||||
#define BANG 0x002 /* allow a ! after the command name */
|
#define BANG 0x002 /* allow a ! after the command name */
|
||||||
@ -98,6 +96,47 @@ typedef struct cmdname {
|
|||||||
int cmd_addr_type; ///< Flag for address type
|
int cmd_addr_type; ///< Flag for address type
|
||||||
} CommandDefinition;
|
} CommandDefinition;
|
||||||
|
|
||||||
|
// A list used for saving values of "emsg_silent". Used by ex_try() to save the
|
||||||
|
// value of "emsg_silent" if it was non-zero. When this is done, the CSF_SILENT
|
||||||
|
// flag below is set.
|
||||||
|
typedef struct eslist_elem eslist_T;
|
||||||
|
struct eslist_elem {
|
||||||
|
int saved_emsg_silent; // saved value of "emsg_silent"
|
||||||
|
eslist_T *next; // next element on the list
|
||||||
|
};
|
||||||
|
|
||||||
|
// For conditional commands a stack is kept of nested conditionals.
|
||||||
|
// When cs_idx < 0, there is no conditional command.
|
||||||
|
enum {
|
||||||
|
CSTACK_LEN = 50,
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
int cs_flags[CSTACK_LEN]; // CSF_ flags
|
||||||
|
char cs_pending[CSTACK_LEN]; // CSTP_: what's pending in ":finally"
|
||||||
|
union {
|
||||||
|
void *csp_rv[CSTACK_LEN]; // return typeval for pending return
|
||||||
|
void *csp_ex[CSTACK_LEN]; // exception for pending throw
|
||||||
|
} cs_pend;
|
||||||
|
void *cs_forinfo[CSTACK_LEN]; // info used by ":for"
|
||||||
|
int cs_line[CSTACK_LEN]; // line nr of ":while"/":for" line
|
||||||
|
int cs_idx; // current entry, or -1 if none
|
||||||
|
int cs_looplevel; // nr of nested ":while"s and ":for"s
|
||||||
|
int cs_trylevel; // nr of nested ":try"s
|
||||||
|
eslist_T *cs_emsg_silent_list; // saved values of "emsg_silent"
|
||||||
|
int cs_lflags; // loop flags: CSL_ flags
|
||||||
|
} cstack_T;
|
||||||
|
# define cs_rettv cs_pend.csp_rv
|
||||||
|
# define cs_exception cs_pend.csp_ex
|
||||||
|
|
||||||
|
// Flags for the cs_lflags item in cstack_T.
|
||||||
|
enum {
|
||||||
|
CSL_HAD_LOOP = 1, // just found ":while" or ":for"
|
||||||
|
CSL_HAD_ENDLOOP = 2, // just found ":endwhile" or ":endfor"
|
||||||
|
CSL_HAD_CONT = 4, // just found ":continue"
|
||||||
|
CSL_HAD_FINA = 8, // just found ":finally"
|
||||||
|
};
|
||||||
|
|
||||||
/// Arguments used for Ex commands.
|
/// Arguments used for Ex commands.
|
||||||
struct exarg {
|
struct exarg {
|
||||||
char_u *arg; ///< argument of the command
|
char_u *arg; ///< argument of the command
|
||||||
@ -128,7 +167,7 @@ struct exarg {
|
|||||||
char_u *errmsg; ///< returned error message
|
char_u *errmsg; ///< returned error message
|
||||||
LineGetter getline; ///< Function used to get the next line
|
LineGetter getline; ///< Function used to get the next line
|
||||||
void *cookie; ///< argument for getline()
|
void *cookie; ///< argument for getline()
|
||||||
struct condstack *cstack; ///< condition stack for ":if" etc.
|
cstack_T *cstack; ///< condition stack for ":if" etc.
|
||||||
};
|
};
|
||||||
|
|
||||||
#define FORCE_BIN 1 // ":edit ++bin file"
|
#define FORCE_BIN 1 // ":edit ++bin file"
|
||||||
|
@ -325,13 +325,13 @@ int do_cmdline(char_u *cmdline, LineGetter fgetline,
|
|||||||
int count = 0; /* line number count */
|
int count = 0; /* line number count */
|
||||||
int did_inc = FALSE; /* incremented RedrawingDisabled */
|
int did_inc = FALSE; /* incremented RedrawingDisabled */
|
||||||
int retval = OK;
|
int retval = OK;
|
||||||
struct condstack cstack; /* conditional stack */
|
cstack_T cstack; // conditional stack
|
||||||
garray_T lines_ga; /* keep lines for ":while"/":for" */
|
garray_T lines_ga; // keep lines for ":while"/":for"
|
||||||
int current_line = 0; /* active line in lines_ga */
|
int current_line = 0; // active line in lines_ga
|
||||||
char_u *fname = NULL; /* function or script name */
|
char_u *fname = NULL; // function or script name
|
||||||
linenr_T *breakpoint = NULL; /* ptr to breakpoint field in cookie */
|
linenr_T *breakpoint = NULL; // ptr to breakpoint field in cookie
|
||||||
int *dbg_tick = NULL; /* ptr to dbg_tick field in cookie */
|
int *dbg_tick = NULL; // ptr to dbg_tick field in cookie
|
||||||
struct dbg_stuff debug_saved; /* saved things for debug mode */
|
struct dbg_stuff debug_saved; // saved things for debug mode
|
||||||
int initial_trylevel;
|
int initial_trylevel;
|
||||||
struct msglist **saved_msg_list = NULL;
|
struct msglist **saved_msg_list = NULL;
|
||||||
struct msglist *private_msg_list;
|
struct msglist *private_msg_list;
|
||||||
@ -361,7 +361,7 @@ int do_cmdline(char_u *cmdline, LineGetter fgetline,
|
|||||||
EMSG(_("E169: Command too recursive"));
|
EMSG(_("E169: Command too recursive"));
|
||||||
// When converting to an exception, we do not include the command name
|
// When converting to an exception, we do not include the command name
|
||||||
// since this is not an error of the specific command.
|
// since this is not an error of the specific command.
|
||||||
do_errthrow((struct condstack *)NULL, (char_u *)NULL);
|
do_errthrow((cstack_T *)NULL, (char_u *)NULL);
|
||||||
msg_list = saved_msg_list;
|
msg_list = saved_msg_list;
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
@ -1545,7 +1545,7 @@ static bool parse_one_cmd(
|
|||||||
*/
|
*/
|
||||||
static char_u * do_one_cmd(char_u **cmdlinep,
|
static char_u * do_one_cmd(char_u **cmdlinep,
|
||||||
int flags,
|
int flags,
|
||||||
struct condstack *cstack,
|
cstack_T *cstack,
|
||||||
LineGetter fgetline,
|
LineGetter fgetline,
|
||||||
void *cookie /* argument for fgetline() */
|
void *cookie /* argument for fgetline() */
|
||||||
)
|
)
|
||||||
|
@ -307,7 +307,7 @@ void free_global_msglist(void)
|
|||||||
* error exception. If cstack is NULL, postpone the throw until do_cmdline()
|
* error exception. If cstack is NULL, postpone the throw until do_cmdline()
|
||||||
* has returned (see do_one_cmd()).
|
* has returned (see do_one_cmd()).
|
||||||
*/
|
*/
|
||||||
void do_errthrow(struct condstack *cstack, char_u *cmdname)
|
void do_errthrow(cstack_T *cstack, char_u *cmdname)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Ensure that all commands in nested function calls and sourced files
|
* Ensure that all commands in nested function calls and sourced files
|
||||||
@ -339,7 +339,7 @@ void do_errthrow(struct condstack *cstack, char_u *cmdname)
|
|||||||
* exception if appropriate. Return TRUE if the current exception is discarded,
|
* exception if appropriate. Return TRUE if the current exception is discarded,
|
||||||
* FALSE otherwise.
|
* FALSE otherwise.
|
||||||
*/
|
*/
|
||||||
int do_intthrow(struct condstack *cstack)
|
int do_intthrow(cstack_T *cstack)
|
||||||
{
|
{
|
||||||
// If no interrupt occurred or no try conditional is active and no exception
|
// If no interrupt occurred or no try conditional is active and no exception
|
||||||
// is being thrown, do nothing (for compatibility of non-EH scripts).
|
// is being thrown, do nothing (for compatibility of non-EH scripts).
|
||||||
@ -795,7 +795,7 @@ void ex_if(exarg_T *eap)
|
|||||||
{
|
{
|
||||||
int skip;
|
int skip;
|
||||||
int result;
|
int result;
|
||||||
struct condstack *cstack = eap->cstack;
|
cstack_T *const cstack = eap->cstack;
|
||||||
|
|
||||||
if (cstack->cs_idx == CSTACK_LEN - 1)
|
if (cstack->cs_idx == CSTACK_LEN - 1)
|
||||||
eap->errmsg = (char_u *)N_("E579: :if nesting too deep");
|
eap->errmsg = (char_u *)N_("E579: :if nesting too deep");
|
||||||
@ -852,7 +852,7 @@ void ex_else(exarg_T *eap)
|
|||||||
{
|
{
|
||||||
int skip;
|
int skip;
|
||||||
int result;
|
int result;
|
||||||
struct condstack *cstack = eap->cstack;
|
cstack_T *const cstack = eap->cstack;
|
||||||
|
|
||||||
skip = CHECK_SKIP;
|
skip = CHECK_SKIP;
|
||||||
|
|
||||||
@ -926,7 +926,7 @@ void ex_while(exarg_T *eap)
|
|||||||
bool error;
|
bool error;
|
||||||
int skip;
|
int skip;
|
||||||
int result;
|
int result;
|
||||||
struct condstack *cstack = eap->cstack;
|
cstack_T *const cstack = eap->cstack;
|
||||||
|
|
||||||
if (cstack->cs_idx == CSTACK_LEN - 1)
|
if (cstack->cs_idx == CSTACK_LEN - 1)
|
||||||
eap->errmsg = (char_u *)N_("E585: :while/:for nesting too deep");
|
eap->errmsg = (char_u *)N_("E585: :while/:for nesting too deep");
|
||||||
@ -1005,7 +1005,7 @@ void ex_while(exarg_T *eap)
|
|||||||
void ex_continue(exarg_T *eap)
|
void ex_continue(exarg_T *eap)
|
||||||
{
|
{
|
||||||
int idx;
|
int idx;
|
||||||
struct condstack *cstack = eap->cstack;
|
cstack_T *const cstack = eap->cstack;
|
||||||
|
|
||||||
if (cstack->cs_looplevel <= 0 || cstack->cs_idx < 0)
|
if (cstack->cs_looplevel <= 0 || cstack->cs_idx < 0)
|
||||||
eap->errmsg = (char_u *)N_("E586: :continue without :while or :for");
|
eap->errmsg = (char_u *)N_("E586: :continue without :while or :for");
|
||||||
@ -1039,7 +1039,7 @@ void ex_continue(exarg_T *eap)
|
|||||||
void ex_break(exarg_T *eap)
|
void ex_break(exarg_T *eap)
|
||||||
{
|
{
|
||||||
int idx;
|
int idx;
|
||||||
struct condstack *cstack = eap->cstack;
|
cstack_T *const cstack = eap->cstack;
|
||||||
|
|
||||||
if (cstack->cs_looplevel <= 0 || cstack->cs_idx < 0)
|
if (cstack->cs_looplevel <= 0 || cstack->cs_idx < 0)
|
||||||
eap->errmsg = (char_u *)N_("E587: :break without :while or :for");
|
eap->errmsg = (char_u *)N_("E587: :break without :while or :for");
|
||||||
@ -1061,7 +1061,7 @@ void ex_break(exarg_T *eap)
|
|||||||
*/
|
*/
|
||||||
void ex_endwhile(exarg_T *eap)
|
void ex_endwhile(exarg_T *eap)
|
||||||
{
|
{
|
||||||
struct condstack *cstack = eap->cstack;
|
cstack_T *const cstack = eap->cstack;
|
||||||
int idx;
|
int idx;
|
||||||
char_u *err;
|
char_u *err;
|
||||||
int csf;
|
int csf;
|
||||||
@ -1164,7 +1164,7 @@ void ex_throw(exarg_T *eap)
|
|||||||
* for ":throw" (user exception) and error and interrupt exceptions. Also
|
* for ":throw" (user exception) and error and interrupt exceptions. Also
|
||||||
* used for rethrowing an uncaught exception.
|
* used for rethrowing an uncaught exception.
|
||||||
*/
|
*/
|
||||||
void do_throw(struct condstack *cstack)
|
void do_throw(cstack_T *cstack)
|
||||||
{
|
{
|
||||||
int idx;
|
int idx;
|
||||||
int inactivate_try = FALSE;
|
int inactivate_try = FALSE;
|
||||||
@ -1225,7 +1225,7 @@ void do_throw(struct condstack *cstack)
|
|||||||
void ex_try(exarg_T *eap)
|
void ex_try(exarg_T *eap)
|
||||||
{
|
{
|
||||||
int skip;
|
int skip;
|
||||||
struct condstack *cstack = eap->cstack;
|
cstack_T *const cstack = eap->cstack;
|
||||||
|
|
||||||
if (cstack->cs_idx == CSTACK_LEN - 1)
|
if (cstack->cs_idx == CSTACK_LEN - 1)
|
||||||
eap->errmsg = (char_u *)N_("E601: :try nesting too deep");
|
eap->errmsg = (char_u *)N_("E601: :try nesting too deep");
|
||||||
@ -1260,7 +1260,7 @@ void ex_try(exarg_T *eap)
|
|||||||
* to save the value.
|
* to save the value.
|
||||||
*/
|
*/
|
||||||
if (emsg_silent) {
|
if (emsg_silent) {
|
||||||
eslist_T *elem = xmalloc(sizeof(struct eslist_elem));
|
eslist_T *elem = xmalloc(sizeof(*elem));
|
||||||
elem->saved_emsg_silent = emsg_silent;
|
elem->saved_emsg_silent = emsg_silent;
|
||||||
elem->next = cstack->cs_emsg_silent_list;
|
elem->next = cstack->cs_emsg_silent_list;
|
||||||
cstack->cs_emsg_silent_list = elem;
|
cstack->cs_emsg_silent_list = elem;
|
||||||
@ -1286,7 +1286,7 @@ void ex_catch(exarg_T *eap)
|
|||||||
char_u *save_cpo;
|
char_u *save_cpo;
|
||||||
regmatch_T regmatch;
|
regmatch_T regmatch;
|
||||||
int prev_got_int;
|
int prev_got_int;
|
||||||
struct condstack *cstack = eap->cstack;
|
cstack_T *const cstack = eap->cstack;
|
||||||
char_u *pat;
|
char_u *pat;
|
||||||
|
|
||||||
if (cstack->cs_trylevel <= 0 || cstack->cs_idx < 0) {
|
if (cstack->cs_trylevel <= 0 || cstack->cs_idx < 0) {
|
||||||
@ -1432,7 +1432,7 @@ void ex_finally(exarg_T *eap)
|
|||||||
int idx;
|
int idx;
|
||||||
int skip = FALSE;
|
int skip = FALSE;
|
||||||
int pending = CSTP_NONE;
|
int pending = CSTP_NONE;
|
||||||
struct condstack *cstack = eap->cstack;
|
cstack_T *const cstack = eap->cstack;
|
||||||
|
|
||||||
if (cstack->cs_trylevel <= 0 || cstack->cs_idx < 0)
|
if (cstack->cs_trylevel <= 0 || cstack->cs_idx < 0)
|
||||||
eap->errmsg = (char_u *)N_("E606: :finally without :try");
|
eap->errmsg = (char_u *)N_("E606: :finally without :try");
|
||||||
@ -1555,7 +1555,7 @@ void ex_endtry(exarg_T *eap)
|
|||||||
int rethrow = FALSE;
|
int rethrow = FALSE;
|
||||||
int pending = CSTP_NONE;
|
int pending = CSTP_NONE;
|
||||||
void *rettv = NULL;
|
void *rettv = NULL;
|
||||||
struct condstack *cstack = eap->cstack;
|
cstack_T *const cstack = eap->cstack;
|
||||||
|
|
||||||
if (cstack->cs_trylevel <= 0 || cstack->cs_idx < 0) {
|
if (cstack->cs_trylevel <= 0 || cstack->cs_idx < 0) {
|
||||||
eap->errmsg = (char_u *)N_("E602: :endtry without :try");
|
eap->errmsg = (char_u *)N_("E602: :endtry without :try");
|
||||||
@ -1882,7 +1882,7 @@ void leave_cleanup(cleanup_T *csp)
|
|||||||
* entered, is restored (used by ex_endtry()). This is normally done only
|
* entered, is restored (used by ex_endtry()). This is normally done only
|
||||||
* when such a try conditional is left.
|
* when such a try conditional is left.
|
||||||
*/
|
*/
|
||||||
int cleanup_conditionals(struct condstack *cstack, int searched_cond, int inclusive)
|
int cleanup_conditionals(cstack_T *cstack, int searched_cond, int inclusive)
|
||||||
{
|
{
|
||||||
int idx;
|
int idx;
|
||||||
int stop = FALSE;
|
int stop = FALSE;
|
||||||
@ -1990,7 +1990,7 @@ int cleanup_conditionals(struct condstack *cstack, int searched_cond, int inclus
|
|||||||
/*
|
/*
|
||||||
* Return an appropriate error message for a missing endwhile/endfor/endif.
|
* Return an appropriate error message for a missing endwhile/endfor/endif.
|
||||||
*/
|
*/
|
||||||
static char_u *get_end_emsg(struct condstack *cstack)
|
static char_u *get_end_emsg(cstack_T *cstack)
|
||||||
{
|
{
|
||||||
if (cstack->cs_flags[cstack->cs_idx] & CSF_WHILE)
|
if (cstack->cs_flags[cstack->cs_idx] & CSF_WHILE)
|
||||||
return e_endwhile;
|
return e_endwhile;
|
||||||
@ -2007,7 +2007,8 @@ static char_u *get_end_emsg(struct condstack *cstack)
|
|||||||
* type.
|
* type.
|
||||||
* Also free "for info" structures where needed.
|
* Also free "for info" structures where needed.
|
||||||
*/
|
*/
|
||||||
void rewind_conditionals(struct condstack *cstack, int idx, int cond_type, int *cond_level)
|
void rewind_conditionals(cstack_T *cstack, int idx, int cond_type,
|
||||||
|
int *cond_level)
|
||||||
{
|
{
|
||||||
while (cstack->cs_idx > idx) {
|
while (cstack->cs_idx > idx) {
|
||||||
if (cstack->cs_flags[cstack->cs_idx] & cond_type)
|
if (cstack->cs_flags[cstack->cs_idx] & cond_type)
|
||||||
|
@ -4,42 +4,6 @@
|
|||||||
#include "nvim/pos.h" // for linenr_T
|
#include "nvim/pos.h" // for linenr_T
|
||||||
#include "nvim/ex_cmds_defs.h" // for exarg_T
|
#include "nvim/ex_cmds_defs.h" // for exarg_T
|
||||||
|
|
||||||
/*
|
|
||||||
* A list used for saving values of "emsg_silent". Used by ex_try() to save the
|
|
||||||
* value of "emsg_silent" if it was non-zero. When this is done, the CSF_SILENT
|
|
||||||
* flag below is set.
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef struct eslist_elem eslist_T;
|
|
||||||
struct eslist_elem {
|
|
||||||
int saved_emsg_silent; /* saved value of "emsg_silent" */
|
|
||||||
eslist_T *next; /* next element on the list */
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* For conditional commands a stack is kept of nested conditionals.
|
|
||||||
* When cs_idx < 0, there is no conditional command.
|
|
||||||
*/
|
|
||||||
#define CSTACK_LEN 50
|
|
||||||
|
|
||||||
struct condstack {
|
|
||||||
int cs_flags[CSTACK_LEN]; // CSF_ flags
|
|
||||||
char cs_pending[CSTACK_LEN]; // CSTP_: what's pending in ":finally"
|
|
||||||
union {
|
|
||||||
void *csp_rv[CSTACK_LEN]; // return typeval for pending return
|
|
||||||
void *csp_ex[CSTACK_LEN]; // exception for pending throw
|
|
||||||
} cs_pend;
|
|
||||||
void *cs_forinfo[CSTACK_LEN]; // info used by ":for"
|
|
||||||
int cs_line[CSTACK_LEN]; // line nr of ":while"/":for" line
|
|
||||||
int cs_idx; // current entry, or -1 if none
|
|
||||||
int cs_looplevel; // nr of nested ":while"s and ":for"s
|
|
||||||
int cs_trylevel; // nr of nested ":try"s
|
|
||||||
eslist_T *cs_emsg_silent_list; // saved values of "emsg_silent"
|
|
||||||
int cs_lflags; // loop flags: CSL_ flags
|
|
||||||
};
|
|
||||||
# define cs_rettv cs_pend.csp_rv
|
|
||||||
# define cs_exception cs_pend.csp_ex
|
|
||||||
|
|
||||||
/* There is no CSF_IF, the lack of CSF_WHILE, CSF_FOR and CSF_TRY means ":if"
|
/* There is no CSF_IF, the lack of CSF_WHILE, CSF_FOR and CSF_TRY means ":if"
|
||||||
* was used. */
|
* was used. */
|
||||||
# define CSF_TRUE 0x0001 /* condition was TRUE */
|
# define CSF_TRUE 0x0001 /* condition was TRUE */
|
||||||
@ -69,14 +33,6 @@ struct condstack {
|
|||||||
# define CSTP_RETURN 24 /* ":return" is pending */
|
# define CSTP_RETURN 24 /* ":return" is pending */
|
||||||
# define CSTP_FINISH 32 /* ":finish" is pending */
|
# define CSTP_FINISH 32 /* ":finish" is pending */
|
||||||
|
|
||||||
/*
|
|
||||||
* Flags for the cs_lflags item in struct condstack.
|
|
||||||
*/
|
|
||||||
# define CSL_HAD_LOOP 1 /* just found ":while" or ":for" */
|
|
||||||
# define CSL_HAD_ENDLOOP 2 /* just found ":endwhile" or ":endfor" */
|
|
||||||
# define CSL_HAD_CONT 4 /* just found ":continue" */
|
|
||||||
# define CSL_HAD_FINA 8 /* just found ":finally" */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A list of error messages that can be converted to an exception. "throw_msg"
|
* 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
|
* is only set in the first element of the list. Usually, it points to the
|
||||||
|
Loading…
Reference in New Issue
Block a user