aboutsummaryrefslogtreecommitdiff
path: root/include/tokenizer.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/tokenizer.h')
-rw-r--r--include/tokenizer.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/tokenizer.h b/include/tokenizer.h
index 57ed9de..b6b401b 100644
--- a/include/tokenizer.h
+++ b/include/tokenizer.h
@@ -4,6 +4,7 @@
#include "std/buffer_view.h"
#include "std/misc.h"
#include "std/defs.h"
+#include "defs.h"
#include "binop_type.h"
#include "compiler_options.h"
#include <stdarg.h>
@@ -42,7 +43,7 @@ typedef enum {
TOK_RETURN
} Token;
-typedef struct {
+struct Tokenizer {
BufferView code;
int index;
int prev_index;
@@ -64,7 +65,7 @@ typedef struct {
bool number_is_integer;
ArenaAllocator *allocator; /* borrowed */
const amal_compiler_options *compiler_options; /* borrowed */
-} Tokenizer;
+};
typedef struct {
int index;
@@ -84,5 +85,6 @@ void tokenizer_print_error_object(Tokenizer *self, TokenizerError *error);
TokenizerError tokenizer_create_error(Tokenizer *self, int index, const char *fmt, ...);
int tokenizer_get_error_index(Tokenizer *self);
int tokenizer_get_code_reference_index(Tokenizer *self, const char *ref);
+bool tokenizer_contains_code_reference(Tokenizer *self, const char *code_ref);
#endif