diff options
author | dan <[email protected]> | 2023-05-26 14:59:16 -0400 |
---|---|---|
committer | dan <[email protected]> | 2023-05-26 14:59:16 -0400 |
commit | 2b7ea0857da80e1353ce0a72239093f108fdc1e9 (patch) | |
tree | bdcfe9a653c94d0385cea58156225149f92dc3ad /optable.h | |
parent | 4e26b8c0a1b7fc843741105d57da863997e7284b (diff) | |
download | forth-2b7ea0857da80e1353ce0a72239093f108fdc1e9.tar.gz forth-2b7ea0857da80e1353ce0a72239093f108fdc1e9.tar.bz2 forth-2b7ea0857da80e1353ce0a72239093f108fdc1e9.zip |
refactor: if and : moved to optable too
Diffstat (limited to 'optable.h')
-rw-r--r-- | optable.h | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -10,11 +10,19 @@ #define WORD_LEN_LIMIT 255 typedef void (*stackop)(stack *); +typedef void (*directiveop)(stack *, int len, char* line, int* i); + +typedef enum { + directive = 0, + builtin = 1, + script = 2, +} optype; typedef struct { char* word; - bool isscript; + optype optype; union { + directiveop directive; stackop op; struct { char* script; |