minishell/src/parser/command_list/command_list_item.h
Khaïs COLIN 56fe943efc
cmdlist: use new architecture (STUB)
I fixed the tests, and the basic functionallity of detecting pipelines works,
but detecting nested cmdgroups is not yet implemented
2025-03-28 14:50:37 +01:00

32 lines
1.3 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* command_list_item.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/03/18 12:54:31 by khais #+# #+# */
/* Updated: 2025/03/18 13:34:14 by khais ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef COMMAND_LIST_ITEM_H
# define COMMAND_LIST_ITEM_H
# include "../cmdgroup/cmdgroup.h"
# include "command_list_item_type.h"
typedef struct s_cmdlist_item
{
enum e_cmdlist_item_type type;
union u_cmdlist_item_inner
{
t_cmdgroup *cmdgroup;
struct s_pipeline *pipeline;
} inner;
} t_cmdlist_item;
void cmdlist_item_destroy(t_cmdlist_item *cmd);
t_cmdlist_item *cmdlist_item_create(void);
#endif // COMMAND_LIST_ITEM_H