1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include <stdlib.h> #include "include/token.h" // token constructor token_t* token_init(int type, char* val) { token_t* token = calloc(1, sizeof(struct TOKEN_STRUC)); token->type = type; token->value = val; return token; }