aboutsummaryrefslogtreecommitdiff
path: root/include/ast.h
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-08-27 18:47:16 +0200
committerCharles Cabergs <me@cacharle.xyz>2020-08-27 18:47:16 +0200
commita680cf09a3fa4b7c6adc38e4297ee5535172826b (patch)
tree461c9110aadbc98ea2e8751ddb51c48d5c508304 /include/ast.h
parentb4002940ce1c1c4648b24f6bf942fc4e4ebab098 (diff)
downloadminishell-a680cf09a3fa4b7c6adc38e4297ee5535172826b.tar.gz
minishell-a680cf09a3fa4b7c6adc38e4297ee5535172826b.tar.bz2
minishell-a680cf09a3fa4b7c6adc38e4297ee5535172826b.zip
Updated preprocessing, redir, ast to use t_tok_lst instead of t_ftlst
Diffstat (limited to 'include/ast.h')
-rw-r--r--include/ast.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/include/ast.h b/include/ast.h
index 7fec75d..8048dd2 100644
--- a/include/ast.h
+++ b/include/ast.h
@@ -6,7 +6,7 @@
/* By: charles <charles@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/04/01 17:05:38 by charles #+# #+# */
-/* Updated: 2020/07/14 09:57:43 by charles ### ########.fr */
+/* Updated: 2020/08/27 18:38:45 by charles ### ########.fr */
/* */
/* ************************************************************************** */
@@ -46,7 +46,7 @@ typedef struct s_op
** \param TAG_OP Operation AST node
*/
-enum e_ast_tag
+enum e_ast
{
AST_CMD,
AST_OP,
@@ -65,24 +65,24 @@ enum e_ast_tag
typedef struct s_ast
{
- enum e_ast_tag tag;
+ enum e_ast tag;
union
{
t_op op;
- t_ftlst *cmd_argv;
+ t_tok_lst *cmd_argv;
struct s_ast *parent_ast;
};
- t_ftlst *redirs;
+ t_tok_lst *redirs;
} t_ast;
-typedef struct s_ret
+typedef struct s_parsed
{
bool syntax_error;
t_ast *ast;
- t_ftlst *rest;
-} t_ret;
+ t_tok_lst *rest;
+} t_parsed;
-t_ast *ast_new(enum e_ast_tag tag);
+t_ast *ast_new(enum e_ast tag);
void ast_destroy(t_ast *ast);
#endif