aboutsummaryrefslogtreecommitdiff
path: root/include/token.h
diff options
context:
space:
mode:
authorChristopher Uhlig2024-10-17 15:32:43 +0200
committerChristopher Uhlig2024-10-17 15:32:43 +0200
commitc1ac406e52fe273a0e14b0f079b522e58c04acd3 (patch)
tree05d2a6c6c838ade625baf9a13e3a6ff0a3663739 /include/token.h
parent9298e72de61af5311678c656c12fc177589671a7 (diff)
parent92bdbf67adaf09d1c831db3cee9456e9c447063f (diff)
downloadminishell-c1ac406e52fe273a0e14b0f079b522e58c04acd3.tar.gz
minishell-c1ac406e52fe273a0e14b0f079b522e58c04acd3.zip
Merge branch 'env' of https://github.com/dpu-kaiser/minishell into env
Diffstat (limited to 'include/token.h')
-rw-r--r--include/token.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/include/token.h b/include/token.h
index 38e758f..54a65f2 100644
--- a/include/token.h
+++ b/include/token.h
@@ -3,10 +3,10 @@
/* ::: :::::::: */
/* token.h :+: :+: :+: */
/* +:+ +:+ +:+ */
-/* By: dkaiser <dkaiser@student.42heilbronn.de +#+ +:+ +#+ */
+/* By: chuhlig <chuhlig@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/06/27 13:27:18 by dkaiser #+# #+# */
-/* Updated: 2024/06/28 14:59:19 by dkaiser ### ########.fr */
+/* Updated: 2024/08/29 15:26:23 by dkaiser ### ########.fr */
/* */
/* ************************************************************************** */
@@ -17,10 +17,10 @@
enum e_token_type
{
- STRING_TOKEN,
- PIPE_TOKEN,
- REDIR_TOKEN,
- NEWLINE_TOKEN
+ STRING_TOKEN = 1,
+ PIPE_TOKEN = 2,
+ REDIR_TOKEN = 4,
+ NEWLINE_TOKEN = 8
};
union u_token_content
@@ -45,5 +45,9 @@ t_token *new_redir_token(int type, t_token *previous,
t_token *next);
void free_token(t_token *token);
+void free_token_and_connect(t_token *token);
+void free_tokens(t_token *tokens);
+void tokenizer(char *s, t_token **token_list,
+ char quote_check);
#endif