57 lines
1.4 KiB
C
57 lines
1.4 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* :::::::: */
|
|
/* typedef.h :+: :+: */
|
|
/* +:+ */
|
|
/* By: whaffman <whaffman@student.codam.nl> +#+ */
|
|
/* +#+ */
|
|
/* Created: 2025/02/05 12:36:08 by whaffman #+# #+# */
|
|
/* Updated: 2025/02/05 12:36:44 by whaffman ######## odam.nl */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#ifndef TYPEDEF_H
|
|
# define TYPEDEF_H
|
|
|
|
|
|
typedef struct s_enviroment
|
|
{
|
|
char *name;
|
|
char *value;
|
|
struct s_enviroment *next;
|
|
} t_enviroment;
|
|
|
|
typedef struct s_minishell
|
|
{
|
|
t_enviroment *enviroment;
|
|
|
|
} t_minishell;
|
|
|
|
typedef enum e_token_type
|
|
{
|
|
T_WORD,
|
|
T_PIPE,
|
|
T_REDIRECT_IN,
|
|
T_REDIRECT_OUT,
|
|
T_APPEND_OUT,
|
|
T_EOF,
|
|
T_ERROR
|
|
} t_token_type;
|
|
|
|
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;
|
|
|
|
#endif // TYPEDEF_H
|