aboutsummaryrefslogtreecommitdiff
path: root/src/token.c
blob: e57ecd5bae7fdae792b11d35985abe5ac2ced9c7 (plain) (blame)
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;
}