30 lines
1.2 KiB
C
30 lines
1.2 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* parse_newline.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2017/01/26 19:26:41 by ariard #+# #+# */
|
|
/* Updated: 2017/02/03 20:04:40 by ariard ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "parser.h"
|
|
|
|
int parse_newline(t_btree **ast, t_list **start, t_list **lst)
|
|
{
|
|
t_list *temp;
|
|
t_astnode *node;
|
|
t_token *token;
|
|
|
|
token = (*lst)->content;
|
|
node = (*ast)->item;
|
|
node->type = TK_NEWLINE;
|
|
temp = (*lst)->next;
|
|
(*lst)->next = NULL;
|
|
ft_lst_delif(start, (*lst)->content, &ft_addrcmp, &token_free);
|
|
ft_parse(ast, start);
|
|
*start = temp;
|
|
return (0);
|
|
}
|