summaryrefslogtreecommitdiff
path: root/sanctuary.fs
diff options
context:
space:
mode:
authorkitty <nepeta@canaglie.net>2026-04-13 01:10:01 +1000
committerkitty <nepeta@canaglie.net>2026-04-13 01:10:01 +1000
commit64984f5987264fb06587fb669801f8c6f4fdcc31 (patch)
tree01ad85ffa758ab80494c1bd78b55a85b719c5e3e /sanctuary.fs
parent4a865170411e49924c6bc95fe871d32d4a40ddbb (diff)
un-standardise `abort"`
i like it better this way
Diffstat (limited to 'sanctuary.fs')
-rw-r--r--sanctuary.fs10
1 files changed, 9 insertions, 1 deletions
diff --git a/sanctuary.fs b/sanctuary.fs
index 0922cbc..e555055 100644
--- a/sanctuary.fs
+++ b/sanctuary.fs
@@ -215,7 +215,7 @@ init-source value source-id
: ." postpone s" postpone type ; immediate compile-only \ "
: e." postpone s" postpone warn ; immediate compile-only \ "
-: (abort") ( ? a u -- ) rot 0<> if warn abort else 2drop then ;
+: (abort") ( a u -- ) warn abort ;
: abort" postpone s" postpone (abort") ; immediate compile-only
\ ERROR MESSAGES {{{
@@ -324,6 +324,14 @@ privatise
: evaluate ( a u -- ) tib @ >r #tib @ >r >in @ >r
(evaluate)
r> >in ! r> #tib ! r> tib ! ;
+
+: ?include-depth include-depth #buffers >= if
+ 0 to include-depth abort" too many input buffers" then ;
+: include-file ( fd -- ) source-id >r ( fd ) dup to source-id
+ 1 +to include-depth ?include-depth
+ 0 cbuffer-used ! 0 cbuffer->in ! ( fd ) cbuffer-fd !
+ begin refill while interpret repeat
+ 1 -to include-depth r> to source-id ;
\ }}}
\ \ VOCABULARY {{{