1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
#ifndef ENGINE_LEXER_H #define ENGINE_LEXER_H typedef enum token_type token_type; enum token_type { // first 255 tokens for ascii characters TOKEN_UNDEFINED = 255, TOKEN_IDENTIFIER, TOKEN_VALUE, }; typedef struct token token; struct token { string8 lexeme; token_type type; }; #endif /* ENGINE_LEXER_H */