aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-08-28 10:27:52 +0200
committerCharles Cabergs <me@cacharle.xyz>2020-08-28 12:54:16 +0200
commitb1cea511d13775425ee38e70c43e8a81f96b888e (patch)
tree615787b79b8f3b0fd9ba023e955c585633351a13 /src/main.c
parent95a16d2d88c8628ab0ae76f3ae04dfebee566950 (diff)
downloadminishell-b1cea511d13775425ee38e70c43e8a81f96b888e.tar.gz
minishell-b1cea511d13775425ee38e70c43e8a81f96b888e.tar.bz2
minishell-b1cea511d13775425ee38e70c43e8a81f96b888e.zip
Cleaning parser
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/main.c b/src/main.c
index 41a4967..e7326de 100644
--- a/src/main.c
+++ b/src/main.c
@@ -6,7 +6,7 @@
/* By: cacharle <cacharle@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/28 11:45:44 by cacharle #+# #+# */
-/* Updated: 2020/08/27 20:44:44 by charles ### ########.fr */
+/* Updated: 2020/08/28 10:45:33 by charles ### ########.fr */
/* */
/* ************************************************************************** */
@@ -87,7 +87,7 @@ int main(int argc, char **argv, char **envp)
if (argc == 3 && ft_strcmp(argv[1], "-l") == 0)
{
- t_tok_lst *lex_out = lexer(ft_strdup(argv[2]));
+ t_tok_lst *lex_out = lexer(argv[2]);
if (lex_out == NULL)
return (1);
tok_lst_debug(lex_out);
@@ -95,12 +95,10 @@ int main(int argc, char **argv, char **envp)
}
else if (argc == 3 && ft_strcmp(argv[1], "-c") == 0)
{
- t_tok_lst *lex_out = lexer(ft_strdup(argv[2]));
+ t_tok_lst *lex_out = lexer(argv[2]);
if (lex_out == NULL)
return (1);
- /* ft_lstiter(lex_out, token_debug); */
-
t_parsed *parser_out = parse(lex_out);
if (parser_out == NULL || parser_out->syntax_error)
return (1);