diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/ast.h | 13 | ||||
| -rw-r--r-- | include/eval.h | 6 | ||||
| -rw-r--r-- | include/parser.h | 5 |
3 files changed, 13 insertions, 11 deletions
diff --git a/include/ast.h b/include/ast.h index bcb5e11..317e1b8 100644 --- a/include/ast.h +++ b/include/ast.h @@ -3,10 +3,10 @@ /* ::: :::::::: */ /* ast.h :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */ +/* By: charles <charles@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/04/01 17:05:38 by charles #+# #+# */ -/* Updated: 2020/06/14 17:47:10 by charles ### ########.fr */ +/* Updated: 2020/06/17 16:43:12 by nahaddac ### ########.fr */ /* */ /* ************************************************************************** */ @@ -33,12 +33,12 @@ struct s_ast; */ -typedef struct s_line +typedef struct s_op { struct s_ast *left; struct s_ast *right; enum e_token_tag sep; -} t_line; +} t_op; /* ** \brief AST node tag (type) @@ -49,7 +49,8 @@ typedef struct s_line enum e_ast_tag { AST_CMD, - AST_LINE, + AST_OP, + AST_OP_PARENT, }; /* @@ -67,7 +68,7 @@ typedef struct s_ast enum e_ast_tag tag; union { - t_line line; + t_op op; t_ftlst *cmd_argv; }; t_ftlst *redirs; diff --git a/include/eval.h b/include/eval.h index f834d45..bde0cd7 100644 --- a/include/eval.h +++ b/include/eval.h @@ -3,10 +3,10 @@ /* ::: :::::::: */ /* eval.h :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */ +/* By: charles <charles@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/04/01 17:05:30 by charles #+# #+# */ -/* Updated: 2020/06/15 11:09:49 by charles ### ########.fr */ +/* Updated: 2020/06/17 15:49:49 by nahaddac ### ########.fr */ /* */ /* ************************************************************************** */ @@ -44,7 +44,7 @@ typedef struct s_eval_status typedef struct { t_eval_state *state; - t_line *line; + t_op *op; int fd_in; int fd_out; } t_fork_param_line; diff --git a/include/parser.h b/include/parser.h index 2bfa9d5..bc1e549 100644 --- a/include/parser.h +++ b/include/parser.h @@ -3,10 +3,10 @@ /* ::: :::::::: */ /* parser.h :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ +/* By: cacharle <cacharle@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/28 09:00:00 by cacharle #+# #+# */ -/* Updated: 2020/06/14 10:31:20 by charles ### ########.fr */ +/* Updated: 2020/06/17 18:03:33 by nahaddac ### ########.fr */ /* */ /* ************************************************************************** */ @@ -38,6 +38,7 @@ */ t_ret *parse(t_ftlst *input); +t_ret *parse_c(t_ftlst *input); t_ast *push_cmd(t_ast *ast, t_ftlst *ret); t_ast *push_redir(t_ast *ast, t_ftlst *rest); |
