From 6562314330e9255c3b5c675bab4697ea146cb6ce Mon Sep 17 00:00:00 2001 From: Maieul BOYER Date: Sat, 12 Oct 2024 17:55:07 +0200 Subject: [PATCH] update: fixed norm error --- exec/src/run_ast/_run_exp_operators.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/exec/src/run_ast/_run_exp_operators.c b/exec/src/run_ast/_run_exp_operators.c index f6c56855..0605ef0c 100644 --- a/exec/src/run_ast/_run_exp_operators.c +++ b/exec/src/run_ast/_run_exp_operators.c @@ -6,7 +6,7 @@ /* By: maiboyer +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/09/14 12:40:01 by maiboyer #+# #+# */ -/* Updated: 2024/10/12 17:51:25 by rparodi ### ########.fr */ +/* Updated: 2024/10/12 17:54:46 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ @@ -64,16 +64,18 @@ t_error _get_op_func(t_ast_expansion *self, return (ERROR); } +// t_error (*op_func)(t_ast_expansion * self, t_state * state, +// t_expansion_result * value); +// if (self == NULL || state == NULL || value == NULL) +// return (ERROR); +// if (_get_op_func(self, &op_func)) +// return (ERROR); +// if (op_func(self, state, value)) +// return (ERROR); +// return (NO_ERROR); + t_error _handle_expansion_operator(t_ast_expansion *self, t_state *state, t_expansion_result *value) { - t_error (*op_func)(t_ast_expansion * self, t_state * state, \ - t_expansion_result * value); - if (self == NULL || state == NULL || value == NULL) - return (ERROR); - if (_get_op_func(self, &op_func)) - return (ERROR); - if (op_func(self, state, value)) - return (ERROR); - return (NO_ERROR); + return (_handle_no_operator(self, state, value)); }