diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-08-19 16:37:13 +0200 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-08-19 16:37:13 +0200 |
| commit | 957434ecd3c8170aafc145263b0090863ceadba3 (patch) | |
| tree | 5a218179d7c282a87564dbf6eb89beb603c3385b /src/lexer | |
| parent | e77b1667e23a05f2874f80f5e47e634c58180c37 (diff) | |
| download | minishell-957434ecd3c8170aafc145263b0090863ceadba3.tar.gz minishell-957434ecd3c8170aafc145263b0090863ceadba3.tar.bz2 minishell-957434ecd3c8170aafc145263b0090863ceadba3.zip | |
Removing glob, Rewritting preprocessing with escape and interpolation only
Diffstat (limited to 'src/lexer')
| -rw-r--r-- | src/lexer/token.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/src/lexer/token.c b/src/lexer/token.c index f7c1691..43971de 100644 --- a/src/lexer/token.c +++ b/src/lexer/token.c @@ -6,7 +6,7 @@ /* By: charles <charles@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/06/09 13:38:08 by charles #+# #+# */ -/* Updated: 2020/07/13 09:58:18 by nahaddac ### ########.fr */ +/* Updated: 2020/08/19 13:40:55 by charles ### ########.fr */ /* */ /* ************************************************************************** */ @@ -55,3 +55,29 @@ void token_destroy_lst2(t_ftlst *tokens1, t_ftlst *tokens2) ft_lstdestroy(&tokens1, (void (*)(void*))token_destroy); ft_lstdestroy(&tokens2, (void (*)(void*))token_destroy); } + +enum e_token_tag token_tag(t_ftlst *token_lst) +{ + return (((t_token*)token_lst->data)->tag); +} + +void token_set_tag(t_ftlst *token_lst, enum e_token_tag tag) +{ + ((t_token*)token_lst->data)->tag = tag; +} + +char *token_content(t_ftlst *token_lst) +{ + return (((t_token*)token_lst->data)->content); +} + +void token_set_content(t_ftlst *token_lst, char *content) +{ + ((t_token*)token_lst->data)->content = content; +} + +void token_set_contentf(t_ftlst *token_lst, char *content) +{ + free(token_content(token_lst)); + token_set_content(token_lst, content); +} |
