scl/src/token.c
Jacob d95c134a54 Test and stuff.
Need to fix testing functions so that every assert is run in each
function of the registry.
2024-09-30 20:55:46 -04:00

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);
}