aboutsummaryrefslogtreecommitdiff
path: root/src/lexer/token.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lexer/token.c')
-rw-r--r--src/lexer/token.c13
1 files changed, 12 insertions, 1 deletions
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 <charles.cabergs@gmail.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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);
+}