summaryrefslogtreecommitdiff
path: root/lali.c
diff options
context:
space:
mode:
authorDaniel Cerqueira <dan.git@lispclub.com>2026-08-19 11:38:36 +0100
committerDaniel Cerqueira <dan.git@lispclub.com>2026-08-19 13:11:29 +0100
commita211b81c4580afe57beed18fea4a913f8fedab6a (patch)
treedce9d9f2e028cf99bb9958e7a9745fd4a74d004b /lali.c
parentcea8240be8f2d3fd4a8993981f44185ba223a977 (diff)
lali lang repl jump
maintain the repl loop, while facing errors of the lali language programming.
Diffstat (limited to 'lali.c')
-rw-r--r--lali.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lali.c b/lali.c
index 73fc601..bdf72b0 100644
--- a/lali.c
+++ b/lali.c
@@ -50,7 +50,7 @@ void runFile(int infd, Object **env, GC_PARAM) {
GC_TRACE(gcObject, nil);
if (setjmp(exceptionEnv))
- return;
+ exit(EXIT_FAILURE);
// deal with shebang
if (peekForward(&stream, true) == EOF)
@@ -69,6 +69,8 @@ void runREPL(int infd, Object **env, GC_PARAM) {
Stream stream = { STREAM_TYPE_STRING, .buffer = "" };
GC_TRACE(gcObject, nil);
+ setjmp(exceptionEnv);
+
do {
/* If the buffer has already been allocated,
return the memory to the free pool. */