[uim-commit] r1942 - branches/r5rs/sigscheme
kzk at freedesktop.org
kzk at freedesktop.org
Tue Nov 1 13:27:47 PST 2005
Author: kzk
Date: 2005-11-01 13:27:38 -0800 (Tue, 01 Nov 2005)
New Revision: 1942
Modified:
branches/r5rs/sigscheme/main.c
Log:
* sigscheme/main.c
- (repl_loop): implement error aware repl loop by using
SRFI-34 feature
Modified: branches/r5rs/sigscheme/main.c
===================================================================
--- branches/r5rs/sigscheme/main.c 2005-11-01 21:05:03 UTC (rev 1941)
+++ branches/r5rs/sigscheme/main.c 2005-11-01 21:27:38 UTC (rev 1942)
@@ -99,8 +99,22 @@
printf("sscm> ");
while (s_exp = SigScm_Read(scm_current_input_port), !EOFP(s_exp)) {
+#if SCM_USE_SRFI34
+ /*
+ * Error Aware repl_loop
+ *
+ * (guard (err (else #f))
+ * (eval exp '()))
+ */
+ result = ScmExp_SRFI34_guard(LIST_2(Scm_Intern("err"),
+ LIST_2(Scm_Intern("else"), SCM_UNDEF)),
+ LIST_1(LIST_3(Scm_Intern("eval"),
+ s_exp,
+ SCM_INTERACTION_ENV)),
+ SCM_INTERACTION_ENV);
+#else /* SCM_USE_SRFI34 */
result = EVAL(s_exp, SCM_INTERACTION_ENV);
-
+#endif
if (is_show_result)
{
#if SCM_USE_SRFI38
More information about the uim-commit
mailing list