25 if (!tokens || !*tokens)
39 pipe_node->
args = malloc(
sizeof(
char *) * 2);
46 pipe_node->
args[1] = NULL;
48 *tokens = next_token->
next;
52 pipe_node->
right = NULL;
62 while (*tokens && (*tokens)->
next)
64 next_token = (*tokens)->
next;
80 command_node->
args = malloc(
sizeof(
char *) * (cmd_arg_count + 1));
81 if (!command_node->
args)
85 return (command_node);
96 current = current->
next;
t_ast * manage_pipe(t_token **tokens, t_ms_data *data)
t_ast * parse_tokens(t_token **tokens, t_ms_data *data)
int cmd_arg_len(t_token *current)
t_ast * create_pipe_node(t_token *next_token, t_token **tokens, t_ms_data *data, t_token *tmp)
t_ast * manage_commands(t_token **tokens, t_ms_data *data)
char * ft_strdup(const char *s)
t_ast * new_ast_node(void)
t_ast * manage_redirs(t_token **tokens, t_ms_data *data)
void set_command_args(t_ast *command_node, t_token **tokens, int arg_count)
void post_process_command_args(t_ast *command_node, int arg_count, t_ms_data *data)