blob: 7bafc0de5490226462d457a1302286c495e41dfa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#ifndef ENGINE_LEXER_H
#define ENGINE_LEXER_H
typedef enum token_flags token_flags;
enum token_flags
{
START_FL = 1 << 1,
END_FL = 1 << 2,
};
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;
token_flags flags;
};
#endif /* ENGINE_LEXER_H */
|