aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-08-19 16:37:13 +0200
committerCharles Cabergs <me@cacharle.xyz>2020-08-19 16:37:13 +0200
commit957434ecd3c8170aafc145263b0090863ceadba3 (patch)
tree5a218179d7c282a87564dbf6eb89beb603c3385b /include
parente77b1667e23a05f2874f80f5e47e634c58180c37 (diff)
downloadminishell-957434ecd3c8170aafc145263b0090863ceadba3.tar.gz
minishell-957434ecd3c8170aafc145263b0090863ceadba3.tar.bz2
minishell-957434ecd3c8170aafc145263b0090863ceadba3.zip
Removing glob, Rewritting preprocessing with escape and interpolation only
Diffstat (limited to 'include')
-rw-r--r--include/lexer.h19
-rw-r--r--include/ms_glob.h36
2 files changed, 15 insertions, 40 deletions
diff --git a/include/lexer.h b/include/lexer.h
index f40db56..27910a5 100644
--- a/include/lexer.h
+++ b/include/lexer.h
@@ -6,7 +6,7 @@
/* By: nahaddac <nahaddac@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/06/19 10:51:26 by nahaddac #+# #+# */
-/* Updated: 2020/07/20 11:07:13 by nahaddac ### ########.fr */
+/* Updated: 2020/08/19 13:41:08 by charles ### ########.fr */
/* */
/* ************************************************************************** */
@@ -53,13 +53,24 @@ int lexer_sep(char input);
int lexer_verif_entre_cote(char *input, int i);
int lexe_space(char *input);
+
+t_token *push_token_enum(t_token *lst_token);
+
+t_ftlst *lexe_trim_out(t_ftlst *lst);
+
+/*
+** token.c
+*/
+
t_token *token_new(enum e_token_tag tag, char *content);
t_token *token_new_until(enum e_token_tag tag, char *content, int n);
void token_destroy(t_token *token);
void token_destroy_lst(t_ftlst *tokens);
void token_destroy_lst2(t_ftlst *tokens1, t_ftlst *tokens2);
-t_token *push_token_enum(t_token *lst_token);
-
-t_ftlst *lexe_trim_out(t_ftlst *lst);
+enum e_token_tag token_tag(t_ftlst *token_lst);
+void token_set_tag(t_ftlst *token_lst, enum e_token_tag tag);
+char *token_content(t_ftlst *token_lst);
+void token_set_content(t_ftlst *token_lst, char *content);
+void token_set_contentf(t_ftlst *token_lst, char *content);
#endif
diff --git a/include/ms_glob.h b/include/ms_glob.h
deleted file mode 100644
index e340c45..0000000
--- a/include/ms_glob.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* ************************************************************************** */
-/* */
-/* ::: :::::::: */
-/* ms_glob.h :+: :+: :+: */
-/* +:+ +:+ +:+ */
-/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */
-/* +#+#+#+#+#+ +#+ */
-/* Created: 2020/04/05 11:45:11 by charles #+# #+# */
-/* Updated: 2020/07/15 12:12:22 by charles ### ########.fr */
-/* */
-/* ************************************************************************** */
-
-#ifndef MS_GLOB_H
-# define MS_GLOB_H
-
-# include <dirent.h>
-# include <unistd.h>
-# include <stddef.h>
-# include <limits.h>
-
-# include "libft_str.h"
-# include "libft_vec.h"
-
-# include "minishell.h"
-
-struct s_glob_param
-{
- char *pattern;
- t_ftvec *matches;
-};
-
-t_ftvec *glob_matches(char *pattern);
-char *ms_glob(char *pattern);
-char *ms_globf(char *pattern);
-
-#endif