diff options
| author | nass1pro <nass1pro@gmail.com> | 2020-06-12 10:12:03 +0200 |
|---|---|---|
| committer | nass1pro <nass1pro@gmail.com> | 2020-06-13 11:41:10 +0200 |
| commit | 3136f59540a8dd29e2f096be5a8943e2ddd28431 (patch) | |
| tree | a09705901c5a090f484845f157066f017c79a873 /test_mini/lexer.c | |
| parent | c4c60ea0f74fc593b0181e1fc8c71c27f0497180 (diff) | |
| download | minishell-3136f59540a8dd29e2f096be5a8943e2ddd28431.tar.gz minishell-3136f59540a8dd29e2f096be5a8943e2ddd28431.tar.bz2 minishell-3136f59540a8dd29e2f096be5a8943e2ddd28431.zip | |
Finking quote resolved
Diffstat (limited to 'test_mini/lexer.c')
| -rw-r--r-- | test_mini/lexer.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test_mini/lexer.c b/test_mini/lexer.c index 7e4fad2..35fd384 100644 --- a/test_mini/lexer.c +++ b/test_mini/lexer.c @@ -1,7 +1,5 @@ #include "lexer.h" -#include "parse/parse.h" - int len_is_not_sep(char *input) { @@ -10,6 +8,9 @@ int len_is_not_sep(char *input) i = -1; while(input[++i]) { + if (input[i] == '\\') + i++; + if (input[i] == '\\' && input[i + 1] == ' ') i += 2; if (lexer_sep(input[i])) @@ -41,6 +42,8 @@ int check_input(char *input) int i; i = 0; + if (input[i] == '\\') + i++; if (lexer_sep(input[i])) { while(input[i] == input[i + 1]) @@ -60,7 +63,6 @@ int check_input(char *input) } - int check_input_out(char *input) { int i; @@ -73,9 +75,7 @@ int check_input_out(char *input) j = 0; j += len_is_not_sep(&input[i]); if (j != 0) - { return(j); - } i += j; j = check_input(&input[i]); return(j); |
