From bec7ecf5c326a1dcf24c1dd70f24a0e48800b932 Mon Sep 17 00:00:00 2001 From: "Raphael (rparodi)" Date: Mon, 29 Jul 2024 17:55:36 +0200 Subject: [PATCH] Fixeed the norm on the arith part --- exec/src/arith/arith.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/exec/src/arith/arith.c b/exec/src/arith/arith.c index bfa81688..21093347 100644 --- a/exec/src/arith/arith.c +++ b/exec/src/arith/arith.c @@ -6,7 +6,7 @@ /* By: maiboyer +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/07/26 15:14:50 by maiboyer #+# #+# */ -/* Updated: 2024/07/29 17:47:33 by rparodi ### ########.fr */ +/* Updated: 2024/07/29 17:50:51 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ @@ -41,9 +41,9 @@ t_error _postfix_get_op(t_ast_arithmetic_operator op, t_arith_op_func *out) t_error _unary_get_op(t_ast_arithmetic_operator op, t_arith_op_func *out) { if (op == ARITH_INCREMENT) - return (*out = _prefix_op_decrement, NO_ERROR); + return (*out = _unary_op_increment, NO_ERROR); if (op == ARITH_DECREMENT) - + return (*out = _unary_op_decrement, NO_ERROR); return (ERROR); } @@ -108,15 +108,16 @@ t_error run_arithmetic_literal(t_ast_arithmetic_literal *arithmetic_literal, \ return (ERROR); } -t_error run_arithmetic_expansion(t_ast_arithmetic_expansion *arithmetic_expansion, \ - t_state *state, t_i64 *out) +t_error run_arithmetic_expansion( \ +t_ast_arithmetic_expansion *arithmetic_expansion, t_state *state, t_i64 *out) { t_arith_op_func func; t_i64 ret; if (arithmetic_expansion == NULL || state == NULL || out == NULL) return (ERROR); - if (_get_node_number(_arith_expansion_to_ast_node(arithmetic_expansion), state, &ret)) + if (_get_node_number(\ + _arith_expansion_to_ast_node(arithmetic_expansion), state, &ret)) return (ERROR); *out = ret; return (NO_ERROR);