From 957434ecd3c8170aafc145263b0090863ceadba3 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Wed, 19 Aug 2020 16:37:13 +0200 Subject: Removing glob, Rewritting preprocessing with escape and interpolation only --- src/lexer/token.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'src/lexer/token.c') 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 +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* 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); +} -- cgit