Mercurial > vim
comparison src/ex_eval.c @ 68:a97c6902ecd9
updated for version 7.0030
author | vimboss |
---|---|
date | Tue, 04 Jan 2005 21:38:36 +0000 |
parents | 125e80798a85 |
children | 388f285bda1b |
comparison
equal
deleted
inserted
replaced
67:6b9e8f951af4 | 68:a97c6902ecd9 |
---|---|
1599 if (pending == CSTP_ERROR || did_emsg || got_int || did_throw) | 1599 if (pending == CSTP_ERROR || did_emsg || got_int || did_throw) |
1600 { | 1600 { |
1601 if (cstack->cs_pending[cstack->cs_idx] == CSTP_RETURN) | 1601 if (cstack->cs_pending[cstack->cs_idx] == CSTP_RETURN) |
1602 { | 1602 { |
1603 report_discard_pending(CSTP_RETURN, | 1603 report_discard_pending(CSTP_RETURN, |
1604 cstack->cs_retvar[cstack->cs_idx]); | 1604 cstack->cs_rettv[cstack->cs_idx]); |
1605 discard_pending_return(cstack->cs_retvar[cstack->cs_idx]); | 1605 discard_pending_return(cstack->cs_rettv[cstack->cs_idx]); |
1606 } | 1606 } |
1607 if (pending == CSTP_ERROR && !did_emsg) | 1607 if (pending == CSTP_ERROR && !did_emsg) |
1608 pending |= (THROW_ON_ERROR) ? CSTP_THROW : 0; | 1608 pending |= (THROW_ON_ERROR) ? CSTP_THROW : 0; |
1609 else | 1609 else |
1610 pending |= did_throw ? CSTP_THROW : 0; | 1610 pending |= did_throw ? CSTP_THROW : 0; |
1645 { | 1645 { |
1646 int idx; | 1646 int idx; |
1647 int skip; | 1647 int skip; |
1648 int rethrow = FALSE; | 1648 int rethrow = FALSE; |
1649 int pending = CSTP_NONE; | 1649 int pending = CSTP_NONE; |
1650 void *retvar = NULL; | 1650 void *rettv = NULL; |
1651 struct condstack *cstack = eap->cstack; | 1651 struct condstack *cstack = eap->cstack; |
1652 | 1652 |
1653 if (cstack->cs_trylevel <= 0 || cstack->cs_idx < 0) | 1653 if (cstack->cs_trylevel <= 0 || cstack->cs_idx < 0) |
1654 eap->errmsg = (char_u *)N_("E602: :endtry without :try"); | 1654 eap->errmsg = (char_u *)N_("E602: :endtry without :try"); |
1655 else | 1655 else |
1744 if (!skip) | 1744 if (!skip) |
1745 { | 1745 { |
1746 pending = cstack->cs_pending[idx]; | 1746 pending = cstack->cs_pending[idx]; |
1747 cstack->cs_pending[idx] = CSTP_NONE; | 1747 cstack->cs_pending[idx] = CSTP_NONE; |
1748 if (pending == CSTP_RETURN) | 1748 if (pending == CSTP_RETURN) |
1749 retvar = cstack->cs_retvar[idx]; | 1749 rettv = cstack->cs_rettv[idx]; |
1750 else if (pending & CSTP_THROW) | 1750 else if (pending & CSTP_THROW) |
1751 current_exception = cstack->cs_exception[idx]; | 1751 current_exception = cstack->cs_exception[idx]; |
1752 } | 1752 } |
1753 | 1753 |
1754 /* | 1754 /* |
1767 --cstack->cs_trylevel; | 1767 --cstack->cs_trylevel; |
1768 | 1768 |
1769 if (!skip) | 1769 if (!skip) |
1770 { | 1770 { |
1771 report_resume_pending(pending, | 1771 report_resume_pending(pending, |
1772 (pending == CSTP_RETURN) ? retvar : | 1772 (pending == CSTP_RETURN) ? rettv : |
1773 (pending & CSTP_THROW) ? (void *)current_exception : NULL); | 1773 (pending & CSTP_THROW) ? (void *)current_exception : NULL); |
1774 switch (pending) | 1774 switch (pending) |
1775 { | 1775 { |
1776 case CSTP_NONE: | 1776 case CSTP_NONE: |
1777 break; | 1777 break; |
1788 break; | 1788 break; |
1789 case CSTP_BREAK: | 1789 case CSTP_BREAK: |
1790 ex_break(eap); | 1790 ex_break(eap); |
1791 break; | 1791 break; |
1792 case CSTP_RETURN: | 1792 case CSTP_RETURN: |
1793 do_return(eap, FALSE, FALSE, retvar); | 1793 do_return(eap, FALSE, FALSE, rettv); |
1794 break; | 1794 break; |
1795 case CSTP_FINISH: | 1795 case CSTP_FINISH: |
1796 do_finish(eap, FALSE); | 1796 do_finish(eap, FALSE); |
1797 break; | 1797 break; |
1798 | 1798 |
2021 cstack->cs_pending[idx] = CSTP_NONE; | 2021 cstack->cs_pending[idx] = CSTP_NONE; |
2022 break; | 2022 break; |
2023 | 2023 |
2024 case CSTP_RETURN: | 2024 case CSTP_RETURN: |
2025 report_discard_pending(CSTP_RETURN, | 2025 report_discard_pending(CSTP_RETURN, |
2026 cstack->cs_retvar[idx]); | 2026 cstack->cs_rettv[idx]); |
2027 discard_pending_return(cstack->cs_retvar[idx]); | 2027 discard_pending_return(cstack->cs_rettv[idx]); |
2028 cstack->cs_pending[idx] = CSTP_NONE; | 2028 cstack->cs_pending[idx] = CSTP_NONE; |
2029 break; | 2029 break; |
2030 | 2030 |
2031 default: | 2031 default: |
2032 if (cstack->cs_flags[idx] & CSF_FINALLY) | 2032 if (cstack->cs_flags[idx] & CSF_FINALLY) |