From f59e909a1adaf545dba4c77d83523eeb5063fbcb Mon Sep 17 00:00:00 2001 From: dan Date: Sat, 3 Jun 2023 18:25:58 -0400 Subject: feat: add do ... loop; --- forthmachine.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'forthmachine.h') diff --git a/forthmachine.h b/forthmachine.h index 4a55952..814e957 100644 --- a/forthmachine.h +++ b/forthmachine.h @@ -21,6 +21,7 @@ typedef enum { compileditem_stackop = 0, compileditem_literal = 1, compileditem_ifcontrol = 2, + compileditem_doloopcontrol = 3, } compileditem_type; typedef struct { @@ -31,6 +32,7 @@ typedef struct { struct { int jumpto; }; + int loopbackto; }; } compileditem; @@ -72,6 +74,7 @@ struct forthmachine { stack* s; char* outputbuffer; errorhandler errorhandler; + stack* lcs; }; #define MAX_OUTPUT_BUFFER_SIZE 1024 -- cgit v1.2.3