aboutsummaryrefslogtreecommitdiffstats
path: root/forth.c
diff options
context:
space:
mode:
authordan <[email protected]>2023-05-26 14:03:17 -0400
committerdan <[email protected]>2023-05-26 14:03:17 -0400
commit4e26b8c0a1b7fc843741105d57da863997e7284b (patch)
tree3439e39efca784ed34e2e22c9ef98ecd53e785b5 /forth.c
parent1ac1b0c94195be3231a4aaa7335dc2f3a169820c (diff)
downloadforth-4e26b8c0a1b7fc843741105d57da863997e7284b.tar.gz
forth-4e26b8c0a1b7fc843741105d57da863997e7284b.tar.bz2
forth-4e26b8c0a1b7fc843741105d57da863997e7284b.zip
refactor: pop and peek are no longer special cases; remove dump command
Diffstat (limited to 'forth.c')
-rw-r--r--forth.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/forth.c b/forth.c
index e9f7637..0b4a99f 100644
--- a/forth.c
+++ b/forth.c
@@ -27,13 +27,6 @@ char isnumber(char *text) {
void eval(stack* s, int len, char* line);
void exec(stack *s, char *word) {
- if (!strcmp(word, "pop") || !strcmp(word, ".")) {
- printf("%d\n", pop(s));
- return;
- } else if (!strcmp(word, "peek")) {
- printf("%d\n", peek(s));
- return;
- }
wordop* op = getop(word);
if (op) {
if (op->isscript) {