summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jefs.fs9
1 files changed, 8 insertions, 1 deletions
diff --git a/jefs.fs b/jefs.fs
index d68c8da..f211395 100644
--- a/jefs.fs
+++ b/jefs.fs
@@ -270,7 +270,11 @@ decimal
: >ffa ( lfa -- ffa ) 8 + ;
: >nfa ( lfa -- nfa ) 9 + ;
-: (words) ( lfa -- ) >nfa dup w@ swap 2 + swap say 2 spaces ;
+: (hide) ( lfa -- ) >ffa dup c@ 1 or swap c! ;
+: hide parse find drop (hide) ; \ todo error handling
+
+: hidden? ( lfa -- ? ) >ffa c@ 1 and 0<> ;
+: (words) ( lfa -- ) dup hidden? not if >nfa dup w@ swap 2 + swap say 2 spaces then ;
: words latest @ begin ?dup 0<> while dup (words) @ repeat cr ;
\ I/O {{{
@@ -333,6 +337,8 @@ stdin buffers-fd !
else over (accept-a) + c! 1+ then
else drop truncate-(accept-n) false swap then repeat
(accept-real-n) (accept-n) = if true else swap then ;
+hide (accept-n) hide (accept-a) hide (accept-real-n)
+hide truncate-(accept-n)
\ i think i'll just take the wonkiness of
\ 'if you use LOAD or something like that you lose the rest of that line'
@@ -353,4 +359,5 @@ make line-buffer line-buffer-length allot
.free
\ make testb 10 allot
\ testb 10 accept .s
+words
bye