Jacob
d95c134a54
Need to fix testing functions so that every assert is run in each function of the registry.
18 lines
255 B
C
18 lines
255 B
C
#include <stdlib.h>
|
|
|
|
#include "include/token.h"
|
|
|
|
Token* token_init(TokenType type, char* val) {
|
|
Token* t = malloc(sizeof(Token));
|
|
|
|
t->type = type;
|
|
t->val = val;
|
|
|
|
return t;
|
|
}
|
|
|
|
void token_destroy(Token* t) {
|
|
free(t->val);
|
|
free(t);
|
|
}
|