diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-08-27 19:13:28 +0200 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-08-27 21:13:39 +0200 |
| commit | 95a16d2d88c8628ab0ae76f3ae04dfebee566950 (patch) | |
| tree | fb8ca171c2ce4fa91a294526764f579f1a7343f3 /src/main.c | |
| parent | a680cf09a3fa4b7c6adc38e4297ee5535172826b (diff) | |
| download | minishell-95a16d2d88c8628ab0ae76f3ae04dfebee566950.tar.gz minishell-95a16d2d88c8628ab0ae76f3ae04dfebee566950.tar.bz2 minishell-95a16d2d88c8628ab0ae76f3ae04dfebee566950.zip | |
Fising tok_lst_new uninitialized next, Added tok_lst_debug, Fixing parse_cmd
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -6,7 +6,7 @@ /* By: cacharle <cacharle@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/28 11:45:44 by cacharle #+# #+# */ -/* Updated: 2020/08/27 18:41:53 by charles ### ########.fr */ +/* Updated: 2020/08/27 20:44:44 by charles ### ########.fr */ /* */ /* ************************************************************************** */ @@ -16,15 +16,15 @@ */ #include "minishell.h" -#include "ast.h" #include "lexer.h" #include "parser.h" #include "eval.h" -void token_debug(void *v); -void token_put(void *v); -void print_level(int level); -void ast_print(int level, t_ast *ast); +/* void token_debug(void *v); */ +/* void token_put(void *v); */ +/* void print_level(int level); */ +/* void ast_print(int level, t_ast *ast); */ +void tok_lst_debug(t_tok_lst *tokens); /* ** TODO @@ -90,6 +90,7 @@ int main(int argc, char **argv, char **envp) t_tok_lst *lex_out = lexer(ft_strdup(argv[2])); if (lex_out == NULL) return (1); + tok_lst_debug(lex_out); /* ft_lstiter((t_ftlst*)lex_out, token_debug); */ } else if (argc == 3 && ft_strcmp(argv[1], "-c") == 0) @@ -145,6 +146,8 @@ int main(int argc, char **argv, char **envp) (void)eval_out; print_prompt(); } + if (ret != FTGL_EOF) + return (1); } ft_htdestroy(path, free); |
