diff options
| author | Dominik Kaiser | 2024-10-17 14:02:28 +0200 |
|---|---|---|
| committer | Dominik Kaiser | 2024-10-17 14:02:28 +0200 |
| commit | 873c0ddbec693666dda5d92654fcb07d4b41b4dc (patch) | |
| tree | 4620160a22005f026db7e18290f508e3d88acc83 /src/repl.c | |
| parent | d5dcf4325dd6efa641767dfd6e07d2c4f80ad252 (diff) | |
| parent | 85d82207526e7220bd14bc96e5f8079ec781fc75 (diff) | |
| download | minishell-873c0ddbec693666dda5d92654fcb07d4b41b4dc.tar.gz minishell-873c0ddbec693666dda5d92654fcb07d4b41b4dc.zip | |
Merge changes from main into interpreter
Diffstat (limited to 'src/repl.c')
| -rw-r--r-- | src/repl.c | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -3,25 +3,35 @@ /* ::: :::::::: */ /* repl.c :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: dkaiser <dkaiser@student.42heilbronn.de +#+ +:+ +#+ */ +/* By: chuhlig <chuhlig@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/06/24 16:07:04 by dkaiser #+# #+# */ -/* Updated: 2024/06/25 15:03:00 by dkaiser ### ########.fr */ +/* Updated: 2024/09/13 16:26:35 by dkaiser ### ########.fr */ /* */ /* ************************************************************************** */ -#include "minishell.h" +#include "../include/minishell.h" +#include "token.h" void repl(const char *prompt) { char *input; + t_token *token_list; + t_list *lines; while (1) { input = readline(prompt); if (input == NULL) return ; + if (input[0] == '\0') + continue ; add_history(input); + token_list = NULL; + tokenizer(input, &token_list, '\0'); + lines = parse(token_list); + if (lines) + print_ast(lines->content); free(input); } } |
