aboutsummaryrefslogtreecommitdiff
path: root/include/tokenizer.h
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-03-03 13:18:08 +0100
committerdec05eba <dec05eba@protonmail.com>2020-07-25 14:36:46 +0200
commitb3b0c807a75c4f854495b547d8e00a598979cbf6 (patch)
treee42017c2f5b87a939d103f48d5f90dd93193ebcc /include/tokenizer.h
parent4c5ffb35d50d514e3df4788e7cf38245c0127883 (diff)
Add arithmetic (binop) parsing
Diffstat (limited to 'include/tokenizer.h')
-rw-r--r--include/tokenizer.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/tokenizer.h b/include/tokenizer.h
index c58917f..21e93ee 100644
--- a/include/tokenizer.h
+++ b/include/tokenizer.h
@@ -3,6 +3,7 @@
#include "std/buffer_view.h"
#include "std/misc.h"
+#include "binop_type.h"
#define TOKENIZER_OK 0
/* General error */
@@ -25,8 +26,9 @@ typedef enum {
TOK_CLOSING_BRACE,
TOK_IMPORT,
TOK_NUMBER,
- TOK_DOT,
- TOK_SEMICOLON
+ TOK_SEMICOLON,
+ TOK_COLON,
+ TOK_BINOP
} Token;
typedef struct {
@@ -47,6 +49,7 @@ typedef struct {
BufferView string;
i64 integer;
f64 floating;
+ BinopType binop_type;
} value;
bool number_is_integer;
} Tokenizer;