aboutsummaryrefslogtreecommitdiff
path: root/src/lexer/lexer.c
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-10-09 12:42:31 +0200
committerCharles Cabergs <me@cacharle.xyz>2020-10-09 12:42:31 +0200
commiteeeeed44a9c7e8bd2f6a579bcace1f90d8a040ec (patch)
tree69dff03e1188e168af2ce5b2b7ce6a792999eb4b /src/lexer/lexer.c
parent6b200dc03c8233f6cd49111540002eb9b5aac4ec (diff)
downloadminishell-eeeeed44a9c7e8bd2f6a579bcace1f90d8a040ec.tar.gz
minishell-eeeeed44a9c7e8bd2f6a579bcace1f90d8a040ec.tar.bz2
minishell-eeeeed44a9c7e8bd2f6a579bcace1f90d8a040ec.zip
Fixing parenthesis leak in parser, Fixing crash on empty input
Diffstat (limited to 'src/lexer/lexer.c')
-rw-r--r--src/lexer/lexer.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/lexer/lexer.c b/src/lexer/lexer.c
index 466e360..9b947f4 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/10/08 09:21:55 by cacharle ### ########.fr */
+/* Updated: 2020/10/09 12:29:32 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
@@ -108,22 +108,9 @@ t_tok_lst *create_token_list(char *input, t_tok_lst **lst)
int lexer(char *input, t_tok_lst **out)
{
int status;
- /* t_tok_lst *curr; */
- if (!input)
- return (2);
*out = NULL;
*out = create_token_list(input, out);
status = lexer_trim(*out);
- /* curr = *out; */
- /* while (curr != NULL) */
- /* { */
- /* if (!(curr->tag & TAG_IS_STR)) */
- /* { */
- /* free(curr->content); */
- /* curr->content = NULL; */
- /* } */
- /* curr = curr->next; */
- /* } */
return (status);
}