From ffec9915be37ceebeadeb12958cbb7424cbd3633 Mon Sep 17 00:00:00 2001 From: Charles Date: Sun, 29 Mar 2020 17:22:13 +0200 Subject: Eval draft --- include/minishell.h | 19 +++++++++++++++++++ include/ms_parse.h | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/minishell.h b/include/minishell.h index 878add8..3398461 100644 --- a/include/minishell.h +++ b/include/minishell.h @@ -42,6 +42,25 @@ typedef t_ftht* t_env; ** eval.c */ +typedef struct +{ + t_status_type type; + union + { + char *error_msg; + char *arg; + int code; + } value; +} t_status; + +typedef enum +{ + STYPE_ERROR, + STYPE_ARG, + STYPE_FILE, + // ... +} t_status_type; + int ms_eval(t_path path, t_env env, t_ast *ast); /* diff --git a/include/ms_parse.h b/include/ms_parse.h index 5351680..9e28ed6 100644 --- a/include/ms_parse.h +++ b/include/ms_parse.h @@ -68,7 +68,7 @@ typedef enum typedef struct s_ast { t_tag tag; - char* contents; + char* content; int children_num; struct s_ast** children; } t_ast; -- cgit