From 665e9eb6fe20730b2f98cbc0f6617985204accc7 Mon Sep 17 00:00:00 2001 From: Christopher Uhlig Date: Fri, 9 Aug 2024 13:00:47 +0200 Subject: [PATCH] test version with a bunch of fixes --- src/tokenizer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tokenizer.c b/src/tokenizer.c index f8ab9c4..672b6dc 100644 --- a/src/tokenizer.c +++ b/src/tokenizer.c @@ -6,7 +6,7 @@ /* By: chuhlig +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/06/28 20:55:50 by chuhlig #+# #+# */ -/* Updated: 2024/08/09 12:37:08 by chuhlig ### ########.fr */ +/* Updated: 2024/08/09 12:59:03 by chuhlig ### ########.fr */ /* */ /* ************************************************************************** */ @@ -78,7 +78,7 @@ void handle_special_chars(char *s, int *i, int *start, t_token **token_list) else if (s[*i] == '\n') *token_list = new_token(NEWLINE_TOKEN, *token_list, NULL); print_token(*token_list); - if (s[*i] == '<' || s[*i] == '>') + if (s[*i + 1] == '<' || s[*i + 1] == '>') (*i)++; *start = *i + 1; } @@ -95,7 +95,7 @@ void tokenizer(char *s, t_token **token_list) f = 0; while (s[++i]) { - if (!f && ft_strchr("|<>\\n", s[i])) + if (!f && ft_strchr("|<>\n", s[i])) handle_special_chars(s, &i, &pos, token_list); else if (f && s[i] == quote_check) f = 0; -- 2.47.2