aboutsummaryrefslogtreecommitdiff
path: root/include/ast.h
diff options
context:
space:
mode:
authornass1pro <nass1pro@gmail.com>2020-06-14 09:39:13 +0200
committernass1pro <nass1pro@gmail.com>2020-06-14 09:39:13 +0200
commit1d455c5b8ba3ecd7fa0b0a5a6718bc6cd7fbd8d9 (patch)
treed8f54d290f2e301ff689dae879305eee5d2a0394 /include/ast.h
parentcadd588473f82cdbbfdb7210bddd22262561faf3 (diff)
downloadminishell-1d455c5b8ba3ecd7fa0b0a5a6718bc6cd7fbd8d9.tar.gz
minishell-1d455c5b8ba3ecd7fa0b0a5a6718bc6cd7fbd8d9.tar.bz2
minishell-1d455c5b8ba3ecd7fa0b0a5a6718bc6cd7fbd8d9.zip
Change LTAG -> TAG in lexer.h
Diffstat (limited to 'include/ast.h')
-rw-r--r--include/ast.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/include/ast.h b/include/ast.h
index a5e55bb..8127930 100644
--- a/include/ast.h
+++ b/include/ast.h
@@ -31,6 +31,12 @@
** \param SEP_OR `||` Execute right if left status != 0
*/
+typedef enum e_bool
+{
+ TRUE,
+ FALSE,
+} t_bool;
+
typedef enum e_sep
{
SEP_END,
@@ -66,9 +72,9 @@ typedef struct s_line
typedef struct s_cmd
{
- char **argv; // change to t_ftvec of t_token
- char *in; // change to t_token
- char *out; // change to t_token
+ t_ftlst *argv; // change to t_ftvec of t_token
+ t_token *in; // change to t_token
+ t_token *out; // change to t_token
bool is_append;
} t_cmd;
@@ -103,9 +109,10 @@ typedef struct s_ast
typedef struct s_ret
{
+ t_bool failed;
t_ast *as;
t_ftlst *rest;
-}
+} t_ret;
t_ast *ast_new(t_ast_tag tag, void *data);
void ast_destroy(t_ast *ast);