42-archive/42sh/srcs/lexer/token_init.c
2017-01-26 19:24:00 +01:00

24 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* token_init.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/11/10 15:30:25 by jhalford #+# #+# */
/* Updated: 2017/01/11 15:45:10 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */
#include "lexer.h"
t_token *token_init(void)
{
t_token *token;
token = (t_token *)malloc(sizeof(t_token));
token->type = 0;
token->size = 10;
token->data = ft_strnew(token->size);
return (token);
}