diff options
Diffstat (limited to 'forth')
| -rw-r--r-- | forth/step0_repl.fs | 23 | ||||
| -rw-r--r-- | forth/types.fs | 5 |
2 files changed, 24 insertions, 4 deletions
diff --git a/forth/step0_repl.fs b/forth/step0_repl.fs new file mode 100644 index 0000000..42c33f5 --- /dev/null +++ b/forth/step0_repl.fs @@ -0,0 +1,23 @@ +s" types.fs" included + +: read ; +: eval ; +: print ; + +: rep + read + eval + print ; + +create buff 128 allot + +: read-lines + begin + ." user> " + buff 128 stdin read-line throw + while + buff swap + rep type cr + repeat ; + +read-lines
\ No newline at end of file diff --git a/forth/types.fs b/forth/types.fs index 2f97fa5..460c3aa 100644 --- a/forth/types.fs +++ b/forth/types.fs @@ -330,7 +330,4 @@ mal-nil 10 MalInt. mal-nil conj conj 20 MalInt. swap conj 23 MalInt. mal-nil conj conj conj - -pr-str safe-type cr - -bye +pr-str s" (nil (20 (42) 10) 23)" str= -1 test= |
