blob: 0c3240ad47acb71605c47208baaa644a4cced6fc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
#ifndef MS_EVAL_H
# define MS_EVAL_H
/**
** \file eval.h
** \brief Evaluation module
*/
# include "minishell.h"
# include "ast.h"
/**
** \brief Evaluation state struct
*/
typedef struct
{
int in_pipe[2]; // need stack pipe
int out_pipe[2];
t_path path;
t_env env;
} t_eval_state;
/**
** \brief Evaluation status struct
*/
typedef struct
{
char *err;
int status;
} t_eval_status;
/**
** \brief Evaluate an AST
** \param state State of the evaluation
** \param ast Abstract syntax tree to evaluate
*/
int eval(t_eval_state *state, t_ast *ast);
#endif
|