diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lexer/lexer.c | 5 | ||||
| -rw-r--r-- | src/lexer/lexer_utils.c | 2 | ||||
| -rw-r--r-- | src/lexer/trim.c | 12 |
3 files changed, 4 insertions, 15 deletions
diff --git a/src/lexer/lexer.c b/src/lexer/lexer.c index befc9b8..176eebd 100644 --- a/src/lexer/lexer.c +++ b/src/lexer/lexer.c @@ -6,12 +6,11 @@ /* By: nahaddac <nahaddac@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/07/16 08:18:25 by nahaddac #+# #+# */ -/* Updated: 2020/09/10 08:33:29 by nahaddac ### ########.fr */ +/* Updated: 2020/09/13 08:52:16 by nahaddac ### ########.fr */ /* */ /* ************************************************************************** */ #include "lexer.h" -#include <stdio.h> int len_until_sep(char *input) { @@ -23,8 +22,6 @@ int len_until_sep(char *input) if (input[i] == '\\') { i +=2; - if (input[i] == '\\') - ; if (input[i] == ' ') { while(input[++i] == ' ') diff --git a/src/lexer/lexer_utils.c b/src/lexer/lexer_utils.c index 60363a5..64a25b1 100644 --- a/src/lexer/lexer_utils.c +++ b/src/lexer/lexer_utils.c @@ -6,7 +6,7 @@ /* By: nahaddac <nahaddac@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/07/16 08:18:15 by nahaddac #+# #+# */ -/* Updated: 2020/08/27 09:55:03 by charles ### ########.fr */ +/* Updated: 2020/09/13 08:38:27 by nahaddac ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/src/lexer/trim.c b/src/lexer/trim.c index ebfb764..fcd62af 100644 --- a/src/lexer/trim.c +++ b/src/lexer/trim.c @@ -6,7 +6,7 @@ /* By: nahaddac <nahaddac@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/07/16 08:18:36 by nahaddac #+# #+# */ -/* Updated: 2020/09/10 04:39:08 by nahaddac ### ########.fr */ +/* Updated: 2020/09/13 08:51:56 by nahaddac ### ########.fr */ /* */ /* ************************************************************************** */ @@ -37,15 +37,7 @@ char *del_quote(char *str) { int i; - i = 0; - while(str[i++] != '\0') - { - if(str[i] == '\\') - i+=2; - if (str[i] == '\'' || str[i] == '"') - break; - } - + i = lexer_check_between_quote(str, 0); if(str[i] != '\'' && str[i] != '"') return str; return (ft_strsubf(str, 1, i - 1)); |
