update: fixed leak and stuff

This commit is contained in:
maix0 2024-10-08 14:54:46 +02:00
parent 75581c7ee0
commit 8d796c4094
8 changed files with 39 additions and 26 deletions

View file

@ -6,7 +6,7 @@
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/02 18:41:16 by maiboyer #+# #+# */
/* Updated: 2024/10/08 13:40:48 by maiboyer ### ########.fr */
/* Updated: 2024/10/08 14:52:02 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
@ -50,10 +50,10 @@ static const struct s_ts_pass_def g_ts_passes[] = {\
{ts_double_lcarret, "double lcarret => dlcarret"}, \
{ts_double_rcarret, "double rcarrer => drcarret"}, \
{ts_fold_into_word, "fold into words"}, \
{ts_fold_cmd, "fold into cmd"}, \
// there should be an ts_fold_arith here
{ts_split_paren, "split double parenthesis"}, \
{ts_fold_redir, "fold redir+argument"}, \
{ts_fold_cmd, "fold into cmd"}, \
};
t_error ts_apply_passes(t_vec_token ts, t_vec_token *out)
@ -72,7 +72,7 @@ t_error ts_apply_passes(t_vec_token ts, t_vec_token *out)
else
me_printf("Applied '%s' pass\n", g_ts_passes[i].name);
ts = next;
//ts_print(&ts);
ts_print(&ts);
i++;
}
return (*out = ts, NO_ERROR);
@ -104,7 +104,7 @@ t_error ts_dq_apply_passes(t_vec_token ts, t_vec_token *out)
else
me_printf("Applied '%s' dq_pass\n", g_ts_dq_passes[i].name);
ts = next;
//ts_print(&ts);
ts_print(&ts);
i++;
}
return (*out = ts, NO_ERROR);