From 48c02f4fccd13cf329594988a19a4edd1fce4774 Mon Sep 17 00:00:00 2001 From: dan Date: Sat, 3 Jun 2023 14:41:14 -0400 Subject: feat: forthmachine and stack errors handled with error handlers, not just by printing --- forthmachine.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'forthmachine.h') diff --git a/forthmachine.h b/forthmachine.h index de59fc5..a3a4522 100644 --- a/forthmachine.h +++ b/forthmachine.h @@ -3,6 +3,7 @@ #include #include #include "stack.h" +#include "errorhandler.h" #define OPTABLE_MAX_SIZE 1024 @@ -69,11 +70,12 @@ struct forthmachine { optable* ot; stack* s; char* outputbuffer; + errorhandler errorhandler; }; #define MAX_OUTPUT_BUFFER_SIZE 1024 -forthmachine* forthmachine_new(); +forthmachine* forthmachine_new(errorhandler errorhandler); void forthmachine_eval(forthmachine* fm, int len, char* line); #endif //OPTABLE_H -- cgit v1.2.3