aboutsummaryrefslogtreecommitdiff
path: root/include/lexer.h
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-06-15 12:39:56 +0200
committerCharles <sircharlesaze@gmail.com>2020-06-15 12:39:56 +0200
commit11a719bab26b3ccccbd219decab2d0cf77021004 (patch)
tree6629ec00d8ac3054f0daa906e3fd06092bef4b32 /include/lexer.h
parentec9177a513d1fdd510abcb70a9640d1bd94023f5 (diff)
downloadminishell-11a719bab26b3ccccbd219decab2d0cf77021004.tar.gz
minishell-11a719bab26b3ccccbd219decab2d0cf77021004.tar.bz2
minishell-11a719bab26b3ccccbd219decab2d0cf77021004.zip
Refactoring redirection out of eval/cmd.c, Added tag check shortcut
Diffstat (limited to 'include/lexer.h')
-rw-r--r--include/lexer.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/lexer.h b/include/lexer.h
index e2abe28..3acffb0 100644
--- a/include/lexer.h
+++ b/include/lexer.h
@@ -21,6 +21,9 @@ enum e_token_tag
TAG_STR_DOUBLE = 1 << 10,
TAG_STR_SINGLE = 1 << 11,
TAG_STICK = 1 << 12,
+
+ TAG_IS_STR = TAG_STR | TAG_STR_SINGLE | TAG_STR_DOUBLE,
+ TAG_IS_REDIR = TAG_REDIR_IN | TAG_REDIR_OUT | TAG_REDIR_APPEND,
};
typedef struct
@@ -39,5 +42,7 @@ int lexe_space(char *input);
t_token *token_new(enum e_token_tag tag, char *content);
void token_destroy(t_token *token);
+void token_destroy_lst(t_ftlst *tokens);
+void token_destroy_lst2(t_ftlst *tokens1, t_ftlst *tokens2);
#endif