From 11a719bab26b3ccccbd219decab2d0cf77021004 Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 15 Jun 2020 12:39:56 +0200 Subject: Refactoring redirection out of eval/cmd.c, Added tag check shortcut --- src/lexer/token.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/lexer') diff --git a/src/lexer/token.c b/src/lexer/token.c index 0a13526..966a443 100644 --- a/src/lexer/token.c +++ b/src/lexer/token.c @@ -6,7 +6,7 @@ /* By: charles +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/06/09 13:38:08 by charles #+# #+# */ -/* Updated: 2020/06/14 20:51:25 by charles ### ########.fr */ +/* Updated: 2020/06/15 11:38:24 by charles ### ########.fr */ /* */ /* ************************************************************************** */ @@ -34,3 +34,14 @@ void token_destroy(t_token *token) free(token->content); free(token); } + +void token_destroy_lst(t_ftlst *tokens) +{ + ft_lstdestroy(&tokens, (void (*)(void*))token_destroy); +} + +void token_destroy_lst2(t_ftlst *tokens1, t_ftlst *tokens2) +{ + ft_lstdestroy(&tokens1, (void (*)(void*))token_destroy); + ft_lstdestroy(&tokens2, (void (*)(void*))token_destroy); +} -- cgit