summaryrefslogtreecommitdiff
path: root/source/lexer.h
diff options
context:
space:
mode:
authornasr <nsrddyn@gmail.com>2026-03-08 21:01:43 +0000
committernasr <nsrddyn@gmail.com>2026-03-08 21:01:43 +0000
commit71ced998122c357bc62e54d9bb4e124c88acf94b (patch)
tree746fca3d71a8640478ad6b6f4429a19f4dfbbda8 /source/lexer.h
parentf8f24f8c67fe903e267ab29bb2fbb9d334a722de (diff)
refactor(main): worked on string handling in C and other stuff
Diffstat (limited to 'source/lexer.h')
-rw-r--r--source/lexer.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/source/lexer.h b/source/lexer.h
new file mode 100644
index 0000000..7bafc0d
--- /dev/null
+++ b/source/lexer.h
@@ -0,0 +1,32 @@
1#ifndef ENGINE_LEXER_H
2#define ENGINE_LEXER_H
3
4typedef enum token_flags token_flags;
5enum token_flags
6{
7 START_FL = 1 << 1,
8 END_FL = 1 << 2,
9};
10
11
12typedef enum token_type token_type;
13enum token_type
14{
15 // first 255 tokens for ascii characters
16 TOKEN_UNDEFINED = 255,
17 TOKEN_IDENTIFIER,
18 TOKEN_VALUE,
19
20};
21
22typedef struct token token;
23struct token
24{
25 string8 lexeme;
26 token_type type;
27 token_flags flags;
28};
29
30
31
32#endif /* ENGINE_LEXER_H */