aboutsummaryrefslogtreecommitdiff
path: root/src/lexer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lexer.h')
-rw-r--r--src/lexer.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lexer.h b/src/lexer.h
index e40ab05..6a14050 100644
--- a/src/lexer.h
+++ b/src/lexer.h
@@ -2,6 +2,7 @@
#define LEXER_H
#include <stdio.h>
+#include "list.h"
#define TOKEN_TYPES(X) \
X(TOKEN_LP) \
@@ -11,11 +12,13 @@
X(TOKEN_INT) \
X(TOKEN_DOT) \
X(TOKEN_QUOTE) \
+ X(TOKEN_QUASI) \
X(TOKEN_UNQUOTE) \
X(TOKEN_LAMBDA) \
X(TOKEN_DEFINE) \
X(TOKEN_QUOTE_FORM) \
X(TOKEN_IF) \
+ X(TOKEN_DEFMACRO) \
X(TOKEN_NONE)
#define TO_ENUM(type) type,
@@ -35,6 +38,13 @@ struct token {
} value;
};
+struct toklist {
+ struct token *tokens;
+ size_t tokens_len;
+
+ struct list_head list;
+};
+
typedef struct lexer * lexer_t;
#define LEXER_EMPTY NULL
@@ -59,5 +69,6 @@ int token_value_string(struct token *token, size_t buf_sz, char *buf);
void token_clone(struct token *dest, struct token *src);
void token_dealloc(struct token *token);
+void toklist_destroy(struct toklist *toklist);
#endif