diff --git a/inc/debug.h b/inc/debug.h index 934b75a..f26f569 100644 --- a/inc/debug.h +++ b/inc/debug.h @@ -16,5 +16,6 @@ # include "minishell.h" void print_commands(void *param); +void token_print(void *param); #endif diff --git a/src/debug/print_commands.c b/src/debug/print_commands.c index 88ed829..ed094e9 100644 --- a/src/debug/print_commands.c +++ b/src/debug/print_commands.c @@ -27,3 +27,12 @@ void print_commands(void *param) printf("%s ", command->args[i]); printf("\n"); } + +void token_print(void *param) +{ + t_token *token; + + token = (t_token *)param; + printf("token type %i, value %s\n", token->type, token->value); +} + diff --git a/src/main.c b/src/main.c index 1cabd60..c41507c 100644 --- a/src/main.c +++ b/src/main.c @@ -14,14 +14,6 @@ #include "minishell.h" #include "utils.h" -static void token_print(void *param) -{ - t_token *token; - - token = (t_token *)param; - printf("token type %i, value %s\n", token->type, token->value); -} - int main(int argc, char **argv, char **envp) { t_minishell *minishell; @@ -40,7 +32,7 @@ int main(int argc, char **argv, char **envp) break ; minishell->lexer = ft_lexer_new(minishell->line); minishell->tokens = ft_parse_input(minishell->lexer); - ft_lstiter(minishell->tokens, token_print); + //ft_lstiter(minishell->tokens, token_print); minishell->commands = parser_get_commands(minishell); simple_builtins(minishell); free_minishell_line(minishell);