summaryrefslogtreecommitdiff
path: root/sanctuary.fs
diff options
context:
space:
mode:
Diffstat (limited to 'sanctuary.fs')
-rw-r--r--sanctuary.fs13
1 files changed, 13 insertions, 0 deletions
diff --git a/sanctuary.fs b/sanctuary.fs
index 6bdfbfc..6bc19e1 100644
--- a/sanctuary.fs
+++ b/sanctuary.fs
@@ -6,6 +6,9 @@
: decimal 10 base ! ;
: hex 16 base ! ;
+: nip swap drop ;
+: tuck swap over ;
+
: <mark here ;
: <resolve here 4 + - d, ;
: >mark here 0 d, ;
@@ -52,4 +55,14 @@
0 constant false
-1 constant true
+
+: cmove, dup >r here swap cmove r> allot ;
+: s" 1 >in +! [ char " ] literal parse ( a u )
+ branch >mark >r 2dup cmove, nip ( u ) ( R: mark )
+ r> dup >resolve 4 + ( u a )
+ postpone literal ( a ) postpone literal ( u ) ; immediate compile-only
+
+1 constant stdout
+2 constant stderr
+
bye