diff options
Diffstat (limited to 'include/ms_eval.h')
| -rw-r--r-- | include/ms_eval.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/include/ms_eval.h b/include/ms_eval.h new file mode 100644 index 0000000..35e7355 --- /dev/null +++ b/include/ms_eval.h @@ -0,0 +1,51 @@ +#ifndef MS_EVAL_H +# define MS_EVAL_H + +/* +** arg: +** type ARG +** value string +** +** redir in: +** type REDIRIN +** value fd +** +** redir out: +** type REDIROUT +** value fd +** +** redir append: +** type REDIRAPPEND +** value fd +*/ + +read state + if redir: + open file keep fd + + +typedef struct +{ + t_status_type type; + union + { + char *str; + int code; + int fd; + } data; +} t_val; + + + +typedef enum +{ + STYPE_ERROR, + STYPE_ARG, + STYPE_FILE, + STYPE_SEXPR, + // ... +} t_status_type; + +int ms_eval(t_path path, t_env env, t_ast *ast); + +#endif |
