normed: everything is now normed

This commit is contained in:
maix0 2024-10-12 16:35:41 +02:00
parent 54f6b7d4e1
commit 38c6daba14
2 changed files with 56 additions and 40 deletions

View file

@ -6,7 +6,7 @@
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/02 18:43:41 by maiboyer #+# #+# */
/* Updated: 2024/10/12 15:38:12 by maiboyer ### ########.fr */
/* Updated: 2024/10/12 16:34:22 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
@ -52,4 +52,42 @@ t_error ts_fold_expension(t_vec_token input, t_vec_token *output);
t_error ts_fold_redir(t_vec_token input, t_vec_token *output);
t_error ts_remove_whitespace(t_vec_token input, t_vec_token *output);
struct s_global_passes
{
struct s_ts_pass_def passes[13];
};
struct s_dq_passes
{
struct s_ts_pass_def passes[3];
};
static inline struct s_global_passes _get_global_passes(void)
{
return ((struct s_global_passes){.passes = {\
{ts_double_string_pass, "double string parser"}, \
{ts_fold_expension, "fold expansion"}, \
{ts_fold_no_quote, "fold no quote"}, \
{ts_fold_whitespace, "fold whitespace"}, \
{ts_double_amp, "double amp => and"}, \
{ts_double_pipe, "double pipe => or"}, \
{ts_double_lcarret, "double lcarret => dlcarret"}, \
{ts_double_rcarret, "double rcarrer => drcarret"}, \
{ts_fold_into_word, "fold into words"}, \
{ts_fold_redir, "fold redir+argument"}, \
{ts_remove_whitespace, "rm extra whitespace"}, \
{ts_fold_cmd, "fold into cmd"}, \
{ts_verify_tokens, "verify only tokens"}, \
}});
}
static inline struct s_dq_passes _get_dq_passes(void)
{
return ((struct s_dq_passes){.passes = {\
{ts_fold_expension, "fold expansion"}, \
{ts_paren_to_noquote, "parenthesis to noquote"}, \
{ts_fold_no_quote, "fold no quote"}, \
}});
}
#endif /* PASSES_H */