Herb C Reference
Loading...
Searching...
No Matches
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 "token_struct.h"
6#include "util/hb_arena.h"
7#include "util/hb_string.h"
8
9token_T* token_init(hb_string_T value, token_type_T type, lexer_T* lexer);
10hb_string_T token_to_string(const token_T* token);
11const char* token_type_to_string(token_type_T type);
12
13char* token_value(const token_T* token);
14int token_type(const token_T* token);
15
16size_t token_sizeof(void);
17
18token_T* token_copy(token_T* token, hb_arena_T* arena);
19
20void token_free(token_T* token);
21
22bool token_value_empty(const token_T* token);
23
24#endif
Definition lexer_struct.h:17
Definition token_struct.h:54
char * token_value(const token_T *token)
size_t token_sizeof(void)
Definition token.c:12
void token_free(token_T *token)
Definition token.c:154
const char * token_type_to_string(token_type_T type)
Definition token.c:45
token_T * token_init(hb_string_T value, token_type_T type, lexer_T *lexer)
Definition token.c:16
token_T * token_copy(token_T *token, hb_arena_T *arena)
Definition token.c:120
bool token_value_empty(const token_T *token)
Definition token.c:150
hb_string_T token_to_string(const token_T *token)
Definition token.c:88
int token_type(const token_T *token)
token_type_T
Definition token_struct.h:9