From 904a7c07b31267b2336b144336fc6ff54627f6d0 Mon Sep 17 00:00:00 2001 From: nass1pro Date: Tue, 16 Jun 2020 13:21:57 +0200 Subject: Update parse --- src/lexer/lexer_utils.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/lexer/lexer_utils.c') diff --git a/src/lexer/lexer_utils.c b/src/lexer/lexer_utils.c index c6bf54a..1b13eaa 100644 --- a/src/lexer/lexer_utils.c +++ b/src/lexer/lexer_utils.c @@ -62,6 +62,8 @@ static int lex_verif_simple_cote(char *input, int i) while(input[i] != '\0') { ++i; + if(input[i] == '\\') + i+=2; if(input[i] == '\'') break; } @@ -77,7 +79,11 @@ int lexer_verif_entre_cote(char *input, int i) return(lex_verif_simple_cote(input, i)); i++; while(input[i] != '"' && (input[i] != '\0')) + { + if (input[i] == '\\') + i += 2; ++i; + } if (input[i + 1] == ' ') while(input[i + 1] == ' ') i++; -- cgit From 0fa76e9e49a70ab9acb128845b3b0b09607133a8 Mon Sep 17 00:00:00 2001 From: nass1pro Date: Tue, 16 Jun 2020 14:35:15 +0200 Subject: Update redire in parse --- src/lexer/lexer_utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lexer/lexer_utils.c') diff --git a/src/lexer/lexer_utils.c b/src/lexer/lexer_utils.c index 1b13eaa..616c0d3 100644 --- a/src/lexer/lexer_utils.c +++ b/src/lexer/lexer_utils.c @@ -63,7 +63,7 @@ static int lex_verif_simple_cote(char *input, int i) { ++i; if(input[i] == '\\') - i+=2; + i+=1; if(input[i] == '\'') break; } @@ -81,7 +81,7 @@ int lexer_verif_entre_cote(char *input, int i) while(input[i] != '"' && (input[i] != '\0')) { if (input[i] == '\\') - i += 2; + i += 1; ++i; } if (input[i + 1] == ' ') -- cgit