From 9fabc25a980550afc6337fd729632462f2680daa Mon Sep 17 00:00:00 2001 From: Charles Date: Sun, 12 Apr 2020 18:36:17 +0200 Subject: Removing data name in ast union, io_frame, root line ast tag --- include/ast.h | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'include/ast.h') diff --git a/include/ast.h b/include/ast.h index 6470a17..b725c8b 100644 --- a/include/ast.h +++ b/include/ast.h @@ -6,7 +6,7 @@ /* By: charles +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/04/01 17:05:38 by charles #+# #+# */ -/* Updated: 2020/04/02 13:27:59 by charles ### ########.fr */ +/* Updated: 2020/05/04 11:59:43 by charles ### ########.fr */ /* */ /* ************************************************************************** */ @@ -25,10 +25,10 @@ /* ** \brief Separator type -** \param SEP_END Regular command end `;` -** \param SEP_PIPE Pipe output of left to right `|` -** \param SEP_AND Execute right if left status == 0 `&&` -** \param SEP_OR Execute right if left status != 0 `||` +** \param SEP_END `;` Regular command end +** \param SEP_PIPE `|` Pipe output of left to right +** \param SEP_AND `&&` Execute right if left status == 0 +** \param SEP_OR `||` Execute right if left status != 0 */ typedef enum e_sep @@ -76,22 +76,19 @@ typedef struct s_cmd ** \brief AST node tag (type) ** \param TAG_CMD Command AST node ** \param TAG_LINE Line AST node -** \param TAG_ROOT Root line AST node */ typedef enum e_ast_tag { TAG_CMD, TAG_LINE, - TAG_ROOT, } t_ast_tag; /* ** \brief AST node struct ** \param tag Node tag -** \param data Union containning possible node data -** \param data::cmd Command struct -** \param data::line Line struct +** \param cmd Command struct +** \param line Line struct */ typedef struct s_ast @@ -101,7 +98,7 @@ typedef struct s_ast { t_line line; t_cmd cmd; - } data; + } ; } t_ast; t_ast *ast_new(t_ast_tag tag, void *data); -- cgit