update: added folding into cmd and changed fold_word name

This commit is contained in:
maix0 2024-10-07 16:49:32 +02:00
parent 7fb16c6a90
commit 5c452993d6
15 changed files with 112 additions and 62 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/06 15:27:24 by maiboyer ### ########.fr */
/* Updated: 2024/10/07 16:46:03 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
@ -42,13 +42,14 @@ t_error ts_double_pipe(t_vec_token input, t_vec_token *output);
t_error ts_double_rcarret(t_vec_token input, t_vec_token *output);
t_error ts_double_rparen(t_vec_token input, t_vec_token *output);
t_error ts_double_string_pass(t_vec_token input, t_vec_token *output);
t_error ts_fold_cmd(t_vec_token input, t_vec_token *output);
t_error ts_fold_into_word(t_vec_token input, t_vec_token *output);
t_error ts_fold_no_quote(t_vec_token input, t_vec_token *output);
t_error ts_fold_whitespace(t_vec_token input, t_vec_token *output);
t_error ts_paren_to_noquote(t_vec_token input, t_vec_token *output);
t_error ts_split_paren(t_vec_token input, t_vec_token *output);
t_error ts_do_fuck_all(t_vec_token input, t_vec_token *output);
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_split_paren(t_vec_token input, t_vec_token *output);
t_error ts_paren_to_noquote(t_vec_token input, t_vec_token *output);
t_error ts_fold_into_word(t_vec_token input, t_vec_token *output);
#endif /* PASSES_H */

View file

@ -6,7 +6,7 @@
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/09/26 17:59:23 by maiboyer #+# #+# */
/* Updated: 2024/10/05 18:54:13 by maiboyer ### ########.fr */
/* Updated: 2024/10/07 16:45:34 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
@ -22,6 +22,7 @@ enum e_token
TOK_AMP, // ampersand == &
TOK_AND, // and == &&
TOK_CARRET, // any carret == < > << >>
TOK_CMD, // a meta token, which contains subtokens
TOK_DLCARRET, // double left carret == <<
TOK_DLPAREN, // double left parenthesis '(('
TOK_DOLLAR, // dollar == $