diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-09-16 16:40:22 +0200 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-09-16 16:40:22 +0200 |
| commit | 3bb997212b3a0d140a34932f9deff52793673d49 (patch) | |
| tree | 2df7ed965a0a29a1c47442831218cdf553633dfb /src/lexer/lexer.c | |
| parent | e439b71d807529734f04ce9d78b98c12022e7c72 (diff) | |
| download | minishell-3bb997212b3a0d140a34932f9deff52793673d49.tar.gz minishell-3bb997212b3a0d140a34932f9deff52793673d49.tar.bz2 minishell-3bb997212b3a0d140a34932f9deff52793673d49.zip | |
Added g_state to store global variables, Refactoring tok_assign_str
Diffstat (limited to 'src/lexer/lexer.c')
| -rw-r--r-- | src/lexer/lexer.c | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/src/lexer/lexer.c b/src/lexer/lexer.c index a1d7469..26355fe 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/14 16:33:58 by charles ### ########.fr */ +/* Updated: 2020/09/16 16:37:49 by charles ### ########.fr */ /* */ /* ************************************************************************** */ @@ -53,7 +53,7 @@ int tok_len(char *input) } if (input[i] == '(' || input[i] == ')') return (i + 1); - if (lexer_sep(input[i])) // fucked on & alone + if (lexer_sep(input[i])) { if (input[i] == input[i + 1]) i++; @@ -114,22 +114,3 @@ int lexer(char *input, t_tok_lst **out) return status; } - -/* int check_input_out(char *input) */ -/* { */ -/* int i; */ -/* int j; */ -/* */ -/* i = 0; */ -/* while(input[i] != '\0') */ -/* { */ -/* j = 0; */ -/* j += len_until_sep(&input[i]); */ -/* if (j != 0) */ -/* return(j); */ -/* i += j; */ -/* j = check_input(&input[i]); */ -/* return(j); */ -/* } */ -/* return(0); */ -/* } */ |
