$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 const char* token_type_to_string(token_type_T type);
11 
12 char* token_value(const token_T* token);
13 int token_type(const token_T* token);
14 
15 size_t token_sizeof(void);
16 
17 token_T* token_copy(token_T* token);
18 
19 void token_free(token_T* token);
20 
21 #endif
Definition: lexer_struct.h:16
Definition: token_struct.h:51
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:155
char * token_to_string(const token_T *token)
Definition: token.c:90
token_T * token_copy(token_T *token)
Definition: token.c:130
char * token_value(const token_T *token)
Definition: token.c:122
int token_type(const token_T *token)
Definition: token.c:126
const char * token_type_to_string(token_type_T type)
Definition: token.c:48
token_type_T
Definition: token_struct.h:7