parsing: remove debugs

This commit is contained in:
Khaïs COLIN 2025-04-14 17:26:32 +02:00
parent 0c489f25bb
commit 54f6c2a609

View file

@ -6,7 +6,7 @@
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */ /* By: khais <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2025/03/31 10:28:28 by jguelen #+# #+# */ /* Created: 2025/03/31 10:28:28 by jguelen #+# #+# */
/* Updated: 2025/04/14 17:18:21 by khais ### ########.fr */ /* Updated: 2025/04/14 17:26:30 by khais ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -23,7 +23,6 @@
*/ */
/* /*
** TODO Check if builder grows that destruction is appropriate. ** TODO Check if builder grows that destruction is appropriate.
** TODO Remove debugs
** TODO Add a function to write a message and set errno in case of allocation ** TODO Add a function to write a message and set errno in case of allocation
** error. ** error.
*/ */
@ -123,7 +122,6 @@ t_redirect *minishell_redir_parse(t_minishell *app, t_wordlist *tokens)
t_worddesc *redir_specifier; t_worddesc *redir_specifier;
t_redirect *new_redir; t_redirect *new_redir;
ft_printf("%s() %s\n", __FUNCTION__, tokens->word->word);
redir_list = NULL; redir_list = NULL;
while (is_redir(tokens->word)) while (is_redir(tokens->word))
{ {
@ -145,7 +143,6 @@ t_cmd *minishell_simple_parse(t_minishell *app, t_wordlist *tokens)
t_cmd *simple; t_cmd *simple;
t_redirect *redir; t_redirect *redir;
ft_printf("%s() %s\n", __FUNCTION__, tokens->word->word);
simple = ft_calloc(1, sizeof(t_cmd)); simple = ft_calloc(1, sizeof(t_cmd));
if (!simple) if (!simple)
{ {
@ -203,7 +200,6 @@ t_cmd *minishell_group_or_smp_parse(t_minishell *app, t_wordlist *tokens)
t_cmd *subtree; t_cmd *subtree;
t_cmd *group; t_cmd *group;
ft_printf("%s() %s\n", __FUNCTION__, tokens->word->word);
if (tokens->word->token_type == OPEN_PARENTH_TOKEN) if (tokens->word->token_type == OPEN_PARENTH_TOKEN)
{ {
worddesc_destroy(wordlist_pop(&tokens)); worddesc_destroy(wordlist_pop(&tokens));
@ -239,7 +235,6 @@ t_cmd *minishell_opt_cmds_parse(t_minishell *app, t_wordlist *tokens,
t_worddesc *token; t_worddesc *token;
t_cmd *opt; t_cmd *opt;
ft_printf("%s() %s\n", __FUNCTION__, tokens->word->word);
token = tokens->word; token = tokens->word;
if (token->token_type == OR_TOKEN || token->token_type == AND_TOKEN) if (token->token_type == OR_TOKEN || token->token_type == AND_TOKEN)
{ {
@ -290,7 +285,6 @@ t_cmd *minishell_pipeline_parse(t_minishell *app, t_wordlist *tokens)
t_cmd *opt; t_cmd *opt;
t_cmd *pipeline; t_cmd *pipeline;
ft_printf("%s() %s\n", __FUNCTION__, tokens->word->word);
subtree = minishell_group_or_smp_parse(app, tokens); subtree = minishell_group_or_smp_parse(app, tokens);
if (!subtree) if (!subtree)
return (NULL); return (NULL);
@ -324,7 +318,6 @@ t_cmd *minishell_cmds_parse(t_minishell *app, t_wordlist *tokens)
t_cmd *list; t_cmd *list;
t_connector connec; t_connector connec;
ft_printf("%s() %s\n", __FUNCTION__, tokens->word->word);
subtree = minishell_pipeline_parse(app, tokens); subtree = minishell_pipeline_parse(app, tokens);
if (!subtree) if (!subtree)
return (NULL); return (NULL);