From b08da252de8dabfbd33caf2f7ea98e12c8a28e75 Mon Sep 17 00:00:00 2001 From: LuckyLaszlo Date: Wed, 1 Dec 2021 16:02:25 +0100 Subject: [PATCH] lexing comment remove --- srcs/lexing/fill_token.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/srcs/lexing/fill_token.c b/srcs/lexing/fill_token.c index 132fd0b..d6f74dd 100644 --- a/srcs/lexing/fill_token.c +++ b/srcs/lexing/fill_token.c @@ -6,7 +6,7 @@ /* By: lperrey +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2021/10/19 08:38:55 by lperrey #+# #+# */ -/* Updated: 2021/12/01 15:48:05 by lperrey ### ########.fr */ +/* Updated: 2021/12/01 16:00:48 by lperrey ### ########.fr */ /* */ /* ************************************************************************** */ @@ -20,19 +20,16 @@ int fill_token(t_token *t, char *input, int *i, int *t_i) { static int quotes_state = 0; - // operators if (!quotes_state) { if (check_operators(t, input, i, t_i) == DELIMITE_TOKEN) return (DELIMITE_TOKEN); } - // quoting if (quoting("es_state, input, i)) { t->content[(*t_i)++] = input[(*i)++]; return (CONTINUE_TOKEN); } - // blanks if (!quotes_state && (input[*i] == ' ' || input[*i] == '\t')) { while (input[*i] == ' ' || input[*i] == '\t') @@ -50,7 +47,7 @@ static int quoting(int *quotes_state, char *input, int *i) { if (*quotes_state == IN_QUOTES) *quotes_state = 0; - else if (ft_strchr(&input[*i + 1], '\'')) // if closed quotes + else if (ft_strchr(&input[*i + 1], '\'')) *quotes_state = IN_QUOTES; return (CONTINUE_TOKEN); } @@ -58,7 +55,7 @@ static int quoting(int *quotes_state, char *input, int *i) { if (*quotes_state == IN_DQUOTES) *quotes_state = 0; - else if (ft_strchr(&input[*i + 1], '\"')) // if closed dquotes + else if (ft_strchr(&input[*i + 1], '\"')) *quotes_state = IN_DQUOTES; return (CONTINUE_TOKEN); }