aboutsummaryrefslogtreecommitdiff
path: root/src/repl.c
diff options
context:
space:
mode:
authorChristopher Uhlig2025-01-23 18:41:18 +0100
committerChristopher Uhlig2025-01-23 18:41:18 +0100
commit18fb7cb8ae69fc3439266a154aa6b0f947d6805d (patch)
tree2cbdd7ab727d82cb69ea7acc431e2ffcc317e4ff /src/repl.c
parent202a5a26d1c0411c441cf12be2b22318abc4f3f9 (diff)
downloadminishell-18fb7cb8ae69fc3439266a154aa6b0f947d6805d.tar.gz
minishell-18fb7cb8ae69fc3439266a154aa6b0f947d6805d.zip
a
Diffstat (limited to 'src/repl.c')
-rw-r--r--src/repl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/repl.c b/src/repl.c
index 3afb2a3..3988a42 100644
--- a/src/repl.c
+++ b/src/repl.c
@@ -6,7 +6,7 @@
/* By: chuhlig <chuhlig@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/06/24 16:07:04 by dkaiser #+# #+# */
-/* Updated: 2025/01/23 12:42:57 by dkaiser ### ########.fr */
+/* Updated: 2025/01/23 17:42:33 by chuhlig ### ########.fr */
/* */
/* ************************************************************************** */
@@ -75,10 +75,12 @@ void repl(const char *prompt, t_env **env, int *promptflag)
token_list = NULL;
tokenizer(input, &token_list, '\0');
tokens_copy = shallow_copy_tokens(token_list);
+ free_tokens(tokens_copy);
+ // print_token_list(token_list);
ast = parse(token_list, env);
if (ast)
set_return_code(eval(ast, env), env);
free_repl(input, ast);
- free_tokens(tokens_copy);
+ print_token_list(tokens_copy);
}
}