1
1
mirror of https://github.com/kanaka/mal.git synced 2024-09-21 02:27:10 +03:00
mal/forth/step0_repl.fs
2018-11-30 14:57:45 -06:00

26 lines
306 B
Forth

require types.fs
: read ;
: eval ;
: print ;
: rep
read
eval
print ;
create buff 128 allot
: read-lines
begin
." user> "
buff 128 stdin read-line throw
while ( num-bytes-read )
dup 0 <> if
buff swap
rep type cr
endif
repeat ;
read-lines