aboutsummaryrefslogtreecommitdiffstats
path: root/optable.h
diff options
context:
space:
mode:
Diffstat (limited to 'optable.h')
-rw-r--r--optable.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/optable.h b/optable.h
index b55b38e..e84ad31 100644
--- a/optable.h
+++ b/optable.h
@@ -12,10 +12,19 @@
typedef void (*stackop)(stack *);
typedef void (*directiveop)(stack *, int len, char* line, int* i);
+typedef struct {
+ bool isliteral;
+ union {
+ stackop stackop;
+ stackitem literal;
+ };
+} compileditem;
+
typedef enum {
directive = 0,
builtin = 1,
script = 2,
+ compiled = 3,
} optype;
typedef struct {
@@ -28,6 +37,10 @@ typedef struct {
char* script;
int scriptlen;
};
+ struct {
+ compileditem* oplist;
+ int oplistlen;
+ };
};
} wordop;
@@ -37,4 +50,6 @@ typedef struct {
*/
wordop* getop(char *word);
+void optable_init();
+
#endif //OPTABLE_H