aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lexer/lexer.c13
1 files changed, 9 insertions, 4 deletions
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 <nahaddac@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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;
}