aboutsummaryrefslogtreecommitdiffstats
path: root/stack.c
diff options
context:
space:
mode:
authordan <[email protected]>2023-06-02 22:04:36 -0400
committerdan <[email protected]>2023-06-02 22:04:36 -0400
commite0fcdc6e3577f8c40b019396b400928379d928b9 (patch)
tree4009df1ca50183c18de31374a368e9857ae7d666 /stack.c
parent60f09fdabfe942d2cb2d2cdb1537318ff2e89e7b (diff)
downloadforth-e0fcdc6e3577f8c40b019396b400928379d928b9.tar.gz
forth-e0fcdc6e3577f8c40b019396b400928379d928b9.tar.bz2
forth-e0fcdc6e3577f8c40b019396b400928379d928b9.zip
feat: runtime defined words are compiled;
Diffstat (limited to 'stack.c')
-rw-r--r--stack.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/stack.c b/stack.c
index 8393a2a..9242f2d 100644
--- a/stack.c
+++ b/stack.c
@@ -11,6 +11,11 @@ stack* stack_new() {
return s;
}
+void stack_free(stack* s) {
+ free(s->start);
+ free(s);
+}
+
void exitunderflow() {
fprintf(stderr, "Error Stack Underflow");
exit(1);