From 2b7ea0857da80e1353ce0a72239093f108fdc1e9 Mon Sep 17 00:00:00 2001 From: dan Date: Fri, 26 May 2023 14:59:16 -0400 Subject: refactor: if and : moved to optable too --- optable.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'optable.h') diff --git a/optable.h b/optable.h index d85ff3d..ebf9a06 100644 --- a/optable.h +++ b/optable.h @@ -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; -- cgit v1.2.3