diff options
| author | nass1pro <nass1pro@gmail.com> | 2020-07-17 10:36:50 +0200 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-07-18 08:57:13 +0200 |
| commit | 134e5ca4fe0a1051fb7946874953608894959a13 (patch) | |
| tree | d0d191f5590bbd5928c1763d5f8f1bce5dcf7d8e /src/lexer/lexer.c | |
| parent | a4e95774030937568dfed6a9445b61e41d1c8478 (diff) | |
| download | minishell-134e5ca4fe0a1051fb7946874953608894959a13.tar.gz minishell-134e5ca4fe0a1051fb7946874953608894959a13.tar.bz2 minishell-134e5ca4fe0a1051fb7946874953608894959a13.zip | |
lexer OK, Added escape handling
Diffstat (limited to 'src/lexer/lexer.c')
| -rw-r--r-- | src/lexer/lexer.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lexer/lexer.c b/src/lexer/lexer.c index 7bacb9f..32b9eeb 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/07/16 11:39:11 by nahaddac ### ########.fr */ +/* Updated: 2020/07/17 13:06:17 by nahaddac ### ########.fr */ /* */ /* ************************************************************************** */ @@ -24,6 +24,7 @@ int len_is_not_sep(char *input) i +=2; if (input[i] == '\\') i += len_is_not_sep(&input[i]); + } if (lexer_sep(input[i])) return(i); @@ -47,9 +48,7 @@ int check_input(char *input) i = 0; op = 1; if (input[i] == '\\' && lexer_sep(input[i + 1])) - { i += 2; - } if (input[i] == '(' || input[i] == ')') return (i + 1); if (lexer_sep(input[i])) @@ -173,6 +172,6 @@ t_ftlst *lexer(char *input) return (NULL); lst = NULL; lst = create_token_list(input, &lst); - //lst = lexe_trim_out(lst); + lst = lexe_trim_out(lst); return (lst); } |
