From 473135b33d46f3433ed35fbf2e374e7fac9ab272 Mon Sep 17 00:00:00 2001 From: Quinten Mennen Date: Wed, 5 Feb 2025 20:48:45 +0100 Subject: [PATCH] print error --- src/lexer/lexer_read_word.c | 1 - src/utils/print_list.c | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lexer/lexer_read_word.c b/src/lexer/lexer_read_word.c index 90cff6d..3b89399 100644 --- a/src/lexer/lexer_read_word.c +++ b/src/lexer/lexer_read_word.c @@ -10,7 +10,6 @@ /* */ /* ************************************************************************** */ -#include "libft.h" #include "minishell.h" static char *ft_parse_quotes(t_lexer *lexer) diff --git a/src/utils/print_list.c b/src/utils/print_list.c index bc1b16a..8204c05 100644 --- a/src/utils/print_list.c +++ b/src/utils/print_list.c @@ -17,5 +17,8 @@ void print_list(void *content) t_token *token; token = (t_token *)content; - ft_printf("%s\n", token->value); + if (token->type != T_ERROR) + ft_printf("%s\n", token->value); + else + ft_printf("unexpected token at position %i\n", token->position); }