diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-08-28 10:27:52 +0200 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-08-28 12:54:16 +0200 |
| commit | b1cea511d13775425ee38e70c43e8a81f96b888e (patch) | |
| tree | 615787b79b8f3b0fd9ba023e955c585633351a13 /include | |
| parent | 95a16d2d88c8628ab0ae76f3ae04dfebee566950 (diff) | |
| download | minishell-b1cea511d13775425ee38e70c43e8a81f96b888e.tar.gz minishell-b1cea511d13775425ee38e70c43e8a81f96b888e.tar.bz2 minishell-b1cea511d13775425ee38e70c43e8a81f96b888e.zip | |
Cleaning parser
Diffstat (limited to 'include')
| -rw-r--r-- | include/lexer.h | 2 | ||||
| -rw-r--r-- | include/parser.h | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/include/lexer.h b/include/lexer.h index f8e16bc..ba248a8 100644 --- a/include/lexer.h +++ b/include/lexer.h @@ -60,7 +60,7 @@ void tok_lst_push_back(t_tok_lst **tokens, t_tok_lst *pushed); t_tok_lst *tok_lst_push_front(t_tok_lst **tokens, t_tok_lst *pushed); void *tok_lst_destroy(t_tok_lst **tokens, void (*del)(void*)); t_tok_lst *tok_lst_last(t_tok_lst *tokens); -t_tok_lst *tok_lst_pop_front(t_tok_lst **tokens); +t_tok_lst *tok_lst_uncons(t_tok_lst **tokens); /* ** lexer.c diff --git a/include/parser.h b/include/parser.h index 061d8f2..ff644ed 100644 --- a/include/parser.h +++ b/include/parser.h @@ -6,7 +6,7 @@ /* By: cacharle <cacharle@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/28 09:00:00 by cacharle #+# #+# */ -/* Updated: 2020/08/27 20:38:13 by charles ### ########.fr */ +/* Updated: 2020/08/28 10:06:44 by charles ### ########.fr */ /* */ /* ************************************************************************** */ @@ -102,7 +102,11 @@ void ast_destroy(t_ast *ast); typedef struct s_parsed { bool syntax_error; - t_ast *ast; + union + { + t_ast *ast; + t_tok_lst *redir; // more general + }; t_tok_lst *rest; } t_parsed; |
