/* ************************************************************************** */ /* */ /* :::::::: */ /* typedef.h :+: :+: */ /* +:+ */ /* By: whaffman +#+ */ /* +#+ */ /* Created: 2025/02/05 12:36:08 by whaffman #+# #+# */ /* Updated: 2025/02/18 14:34:39 by whaffman ######## odam.nl */ /* */ /* ************************************************************************** */ #ifndef TYPEDEF_H # define TYPEDEF_H typedef enum e_token_type { T_WORD, T_PIPE, T_REDIRECT_IN, T_REDIRECT_OUT, T_APPEND_OUT, T_HEREDOC, T_EOF, T_ERROR } t_token_type; typedef struct s_environment { char *name; char *value; } t_environment; typedef struct s_token { t_token_type type; char *value; int position; } t_token; typedef struct s_lexer { char *input; int pos; int n_pos; char current_char; } t_lexer; typedef struct s_command { char *command; char **args; t_list *environment; int fd_in; int fd_out; int n_fds; int exit_status; } t_command; typedef struct s_minishell { t_list *environment; char *line; t_lexer *lexer; t_list *tokens; t_list *commands; } t_minishell; #endif // TYPEDEF_H