$darkmode
Herb C Reference
token.h
Go to the documentation of this file.
1 #ifndef HERB_TOKEN_H
2 #define HERB_TOKEN_H
3 
4 #include "lexer_struct.h"
5 #include "position.h"
6 #include "token_struct.h"
7 
8 token_T* token_init(const char* value, token_type_T type, lexer_T* lexer);
9 char* token_to_string(const token_T* token);
10 char* token_to_json(const token_T* token);
11 const char* token_type_to_string(token_type_T type);
12 
13 char* token_value(const token_T* token);
14 int token_type(const token_T* token);
15 
18 
19 size_t token_sizeof(void);
20 
21 token_T* token_copy(token_T* token);
22 
23 void token_free(token_T* token);
24 
25 #endif
Definition: lexer_struct.h:13
Definition: position.h:6
Definition: token_struct.h:45
size_t token_sizeof(void)
Definition: token.c:12
token_T * token_init(const char *value, token_type_T type, lexer_T *lexer)
Definition: token.c:16
void token_free(token_T *token)
Definition: token.c:187
char * token_to_string(const token_T *token)
Definition: token.c:79
token_T * token_copy(token_T *token)
Definition: token.c:162
char * token_value(const token_T *token)
Definition: token.c:146
position_T * token_end_position(token_T *token)
Definition: token.c:158
char * token_to_json(const token_T *token)
Definition: token.c:110
position_T * token_start_position(token_T *token)
Definition: token.c:154
int token_type(const token_T *token)
Definition: token.c:150
const char * token_type_to_string(token_type_T type)
Definition: token.c:43
token_type_T
Definition: token_struct.h:7