From 10b54ed457ec0999e9289811401907d3a88970dc Mon Sep 17 00:00:00 2001 From: nass1pro Date: Thu, 10 Sep 2020 08:33:48 +0200 Subject: test escape full ok --- src/lexer/lexer.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/lexer/lexer.c b/src/lexer/lexer.c index 57aee6b..befc9b8 100644 --- a/src/lexer/lexer.c +++ b/src/lexer/lexer.c @@ -6,7 +6,7 @@ /* By: nahaddac +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/07/16 08:18:25 by nahaddac #+# #+# */ -/* Updated: 2020/09/10 06:40:10 by nahaddac ### ########.fr */ +/* Updated: 2020/09/10 08:33:29 by nahaddac ### ########.fr */ /* */ /* ************************************************************************** */ @@ -24,9 +24,14 @@ int len_until_sep(char *input) { i +=2; if (input[i] == '\\') - i += len_until_sep(&input[i]); - i += lexer_space(&input[i]); - if (input[i] != lexer_sep(input[i]) || input[i] != 39 || input[i] != '"') + ; + if (input[i] == ' ') + { + while(input[++i] == ' ') + ; + return i; + } + else if (input[i] != lexer_sep(input[i]) || input[i] != 39 || input[i] != '"') i += len_until_sep(&input[i]); return i; } -- cgit