Mercurial > vim
comparison src/structs.h @ 75:388f285bda1b
updated for version 7.0031
author | vimboss |
---|---|
date | Wed, 05 Jan 2005 22:16:17 +0000 |
parents | a97c6902ecd9 |
children | e918d3e340a4 |
comparison
equal
deleted
inserted
replaced
74:1154524da1cd | 75:388f285bda1b |
---|---|
593 */ | 593 */ |
594 #define CSTACK_LEN 50 | 594 #define CSTACK_LEN 50 |
595 | 595 |
596 struct condstack | 596 struct condstack |
597 { | 597 { |
598 char cs_flags[CSTACK_LEN]; /* CSF_ flags */ | 598 short cs_flags[CSTACK_LEN]; /* CSF_ flags */ |
599 char cs_pending[CSTACK_LEN]; /* CSTP_: what's pending in ":finally"*/ | 599 char cs_pending[CSTACK_LEN]; /* CSTP_: what's pending in ":finally"*/ |
600 union { | 600 union { |
601 void *cs_pend_rv[CSTACK_LEN]; /* return typeval for pending return */ | 601 void *csp_rv[CSTACK_LEN]; /* return typeval for pending return */ |
602 void *cs_pend_ex[CSTACK_LEN]; /* exception for pending throw */ | 602 void *csp_ex[CSTACK_LEN]; /* exception for pending throw */ |
603 } cs_pend; | 603 } cs_pend; |
604 int cs_line[CSTACK_LEN]; /* line number of ":while" line */ | 604 void *cs_fors[CSTACK_LEN]; /* info used by ":for" */ |
605 int cs_line[CSTACK_LEN]; /* line nr of ":while"/":for" line */ | |
605 int cs_idx; /* current entry, or -1 if none */ | 606 int cs_idx; /* current entry, or -1 if none */ |
606 int cs_whilelevel; /* number of nested ":while"s */ | 607 int cs_looplevel; /* nr of nested ":while"s and ":for"s */ |
607 int cs_trylevel; /* number of nested ":try"s */ | 608 int cs_trylevel; /* nr of nested ":try"s */ |
608 eslist_T *cs_emsg_silent_list; /* saved values of "emsg_silent" */ | 609 eslist_T *cs_emsg_silent_list; /* saved values of "emsg_silent" */ |
609 char cs_had_while; /* just found ":while" */ | 610 char cs_lflags; /* loop flags: CSL_ flags */ |
610 char cs_had_continue; /* just found ":continue" */ | 611 }; |
611 char cs_had_endwhile; /* just found ":endwhile" */ | 612 # define cs_rettv cs_pend.csp_rv |
612 char cs_had_finally; /* just found ":finally" */ | 613 # define cs_exception cs_pend.csp_ex |
613 }; | 614 |
614 # define cs_rettv cs_pend.cs_pend_rv | 615 # define CSF_TRUE 0x0001 /* condition was TRUE */ |
615 # define cs_exception cs_pend.cs_pend_ex | 616 # define CSF_ACTIVE 0x0002 /* current state is active */ |
616 | 617 # define CSF_ELSE 0x0004 /* ":else" has been passed */ |
617 # define CSF_TRUE 1 /* condition was TRUE */ | 618 # define CSF_WHILE 0x0008 /* is a ":while" */ |
618 # define CSF_ACTIVE 2 /* current state is active */ | 619 # define CSF_FOR 0x0010 /* is a ":for" */ |
619 # define CSF_ELSE 4 /* ":else" has been passed */ | 620 |
620 # define CSF_WHILE 8 /* is a ":while" */ | 621 # define CSF_TRY 0x0100 /* is a ":try" */ |
621 # define CSF_TRY 16 /* is a ":try" */ | 622 # define CSF_FINALLY 0x0200 /* ":finally" has been passed */ |
622 # define CSF_FINALLY 32 /* ":finally" has been passed */ | 623 # define CSF_THROWN 0x0400 /* exception thrown to this try conditional */ |
623 # define CSF_THROWN 64 /* exception thrown to this try conditional */ | 624 # define CSF_CAUGHT 0x0800 /* exception caught by this try conditional */ |
624 # define CSF_CAUGHT 128 /* exception caught by this try conditional */ | 625 # define CSF_SILENT 0x1000 /* "emsg_silent" reset by ":try" */ |
625 # define CSF_SILENT 4 /* "emsg_silent" reset by ":try" */ | |
626 /* Note that CSF_ELSE is only used when CSF_TRY and CSF_WHILE are unset | 626 /* Note that CSF_ELSE is only used when CSF_TRY and CSF_WHILE are unset |
627 * (an ":if"), and CSF_SILENT is only used when CSF_TRY is set. */ | 627 * (an ":if"), and CSF_SILENT is only used when CSF_TRY is set. */ |
628 | 628 |
629 /* | 629 /* |
630 * What's pending for being reactivated at the ":endtry" of this try | 630 * What's pending for being reactivated at the ":endtry" of this try |
636 # define CSTP_THROW 4 /* a throw is pending */ | 636 # define CSTP_THROW 4 /* a throw is pending */ |
637 # define CSTP_BREAK 8 /* ":break" is pending */ | 637 # define CSTP_BREAK 8 /* ":break" is pending */ |
638 # define CSTP_CONTINUE 16 /* ":continue" is pending */ | 638 # define CSTP_CONTINUE 16 /* ":continue" is pending */ |
639 # define CSTP_RETURN 24 /* ":return" is pending */ | 639 # define CSTP_RETURN 24 /* ":return" is pending */ |
640 # define CSTP_FINISH 32 /* ":finish" is pending */ | 640 # define CSTP_FINISH 32 /* ":finish" is pending */ |
641 | |
642 /* | |
643 * Flags for the cs_lflags item in struct condstack. | |
644 */ | |
645 # define CSL_HAD_LOOP 1 /* just found ":while" or ":for" */ | |
646 # define CSL_HAD_ENDLOOP 2 /* just found ":endwhile" or ":endfor" */ | |
647 # define CSL_HAD_CONT 4 /* just found ":continue" */ | |
648 # define CSL_HAD_FINA 8 /* just found ":finally" */ | |
641 | 649 |
642 /* | 650 /* |
643 * A list of error messages that can be converted to an exception. "throw_msg" | 651 * A list of error messages that can be converted to an exception. "throw_msg" |
644 * is only set in the first element of the list. Usually, it points to the | 652 * is only set in the first element of the list. Usually, it points to the |
645 * original message stored in that element, but sometimes it points to a later | 653 * original message stored in that element, but sometimes it points to a later |