diff options
| author | Irene Knapp <ireneista@irenes.space> | 2026-05-22 00:58:23 -0700 |
|---|---|---|
| committer | Irene Knapp <ireneista@irenes.space> | 2026-05-22 00:58:23 -0700 |
| commit | 725af82ad48c1d6275a2e9ef6ef88f1c89f2e929 (patch) | |
| tree | 0c6c87ea4419c09ea09cefc0fc91e828a8b0e91e | |
| parent | ed702c3b88953112a3682c818a6e801549e1b461 (diff) | |
yesssss the interpreter fully works, wow
haven't checked if it can compile itself yet :) Force-Push: yes Change-Id: I144981a04f09ecd0e9150369663ae8115bd39bdd
| -rw-r--r-- | dynamic.e | 3 | ||||
| -rw-r--r-- | interpret.e | 10 |
2 files changed, 8 insertions, 5 deletions
diff --git a/dynamic.e b/dynamic.e index 2edcc13..773511f 100644 --- a/dynamic.e +++ b/dynamic.e @@ -204,6 +204,9 @@ newline ; +: bye 0 sys-exit ; + + ~ Log manipulation ~ ~~~~~~~~~~~~~~~~ diff --git a/interpret.e b/interpret.e index 3e30523..5941d15 100644 --- a/interpret.e +++ b/interpret.e @@ -191,11 +191,11 @@ { key dup is-space } { drop } while ~ Early exit if it's a zero byte. - { - dup 0 = { drop dropstring 0 exit } if + dup 0 = { drop dropstring 0 exit } if - accumulate-string + accumulate-string + { peek dup is-space { drop exit } if dup { drop exit } unless consume accumulate-string @@ -463,7 +463,7 @@ latest @ value@ find ~ Check whether the word was found in the dictionary. - dup 0 != { + dup { ~ If the word is in the dictionary, check what mode we're in, then... dropstring-with-result ~ (entry pointer) @@ -504,7 +504,7 @@ latest @ } if ~ If it's neither in the dictionary nor a number, just print an error. - s" No such word: " emitstring value@ emitstring dropstring ; + ." No such word: " value@ emitstring newline dropstring ; : quit r0 @ control! { interpret } forever ; |