blob: 1cd0d91b466a2320416e5b12e5737c4bc552f801 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#include "./include/token.h"
#include "./include/macros.h"
#include <stdlib.h>
token_t *init_token(int type, char *value, int row, int col) {
token_t *t = (token_t *)malloc(sizeof(token_t));
if (t == NULL)
die("malloc on token struct");
t->type = type;
t->value = value;
t->row = row;
t->col = col;
return t;
}
|