WIP: got back to working state
This commit is contained in:
parent
4e72b48b4a
commit
b4f948d98d
4 changed files with 22 additions and 12 deletions
8
Makefile
8
Makefile
|
|
@ -6,7 +6,7 @@
|
||||||
# By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ #
|
# By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ #
|
||||||
# +#+#+#+#+#+ +#+ #
|
# +#+#+#+#+#+ +#+ #
|
||||||
# Created: 2023/11/12 11:05:05 by rparodi #+# #+# #
|
# Created: 2023/11/12 11:05:05 by rparodi #+# #+# #
|
||||||
# Updated: 2024/07/31 17:42:00 by maiboyer ### ########.fr #
|
# Updated: 2024/08/01 07:16:16 by maiboyer ### ########.fr #
|
||||||
# #
|
# #
|
||||||
# **************************************************************************** #
|
# **************************************************************************** #
|
||||||
|
|
||||||
|
|
@ -45,10 +45,10 @@ endif
|
||||||
|
|
||||||
# TODO: REMOVE THIS WHEN FINISHING THIS:
|
# TODO: REMOVE THIS WHEN FINISHING THIS:
|
||||||
CFLAGS_ADDITIONAL += -DPRINT_BACKTRACE
|
CFLAGS_ADDITIONAL += -DPRINT_BACKTRACE
|
||||||
#CFLAGS_ADDITIONAL += -gcolumn-info
|
CFLAGS_ADDITIONAL += -gcolumn-info -g3
|
||||||
CFLAGS_ADDITIONAL += '-DERROR=((void)printf("ERROR HERE: " __FILE__ ":%d in %s\n", __LINE__, __func__), 1)'
|
CFLAGS_ADDITIONAL += '-DERROR=((void)printf("ERROR HERE: " __FILE__ ":%d in %s\n", __LINE__, __func__), 1)'
|
||||||
CFLAGS_ADDITIONAL += -O2
|
#CFLAGS_ADDITIONAL += -O2
|
||||||
# CFLAGS_ADDITIONAL += -fuse-ld=gold -Wl,--print-symbol-counts -Wl,/tmp/symbols.count.log
|
#CFLAGS_ADDITIONAL += -fuse-ld=gold -Wl,--print-symbol-counts -Wl,/tmp/symbols.count.log
|
||||||
|
|
||||||
export CFLAGS_ADDITIONAL
|
export CFLAGS_ADDITIONAL
|
||||||
export CC
|
export CC
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/07/27 21:13:15 by rparodi #+# #+# */
|
/* Created: 2024/07/27 21:13:15 by rparodi #+# #+# */
|
||||||
/* Updated: 2024/07/30 15:58:54 by maiboyer ### ########.fr */
|
/* Updated: 2024/08/01 06:21:37 by maiboyer ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -36,14 +36,22 @@ t_ast_arithmetic_expansion *arithmetic_expansion, t_state *state, t_i64 *out);
|
||||||
t_error _get_node_number(t_ast_node self, t_state *state, t_i64 *out);
|
t_error _get_node_number(t_ast_node self, t_state *state, t_i64 *out);
|
||||||
|
|
||||||
t_error _binary_op_add(t_ast_node self, t_state *state, t_i64 *out);
|
t_error _binary_op_add(t_ast_node self, t_state *state, t_i64 *out);
|
||||||
t_error _binary_op_sub(t_ast_node self, t_state *state, t_i64 *out);
|
|
||||||
t_error _binary_op_mul(t_ast_node self, t_state *state, t_i64 *out);
|
|
||||||
t_error _binary_op_div(t_ast_node self, t_state *state, t_i64 *out);
|
t_error _binary_op_div(t_ast_node self, t_state *state, t_i64 *out);
|
||||||
t_error _binary_op_mod(t_ast_node self, t_state *state, t_i64 *out);
|
t_error _binary_op_mod(t_ast_node self, t_state *state, t_i64 *out);
|
||||||
t_error _postfix_op_inc(t_ast_node self, t_state *state, t_i64 *out);
|
t_error _binary_op_mul(t_ast_node self, t_state *state, t_i64 *out);
|
||||||
|
t_error _binary_op_sub(t_ast_node self, t_state *state, t_i64 *out);
|
||||||
|
|
||||||
t_error _postfix_op_dec(t_ast_node self, t_state *state, t_i64 *out);
|
t_error _postfix_op_dec(t_ast_node self, t_state *state, t_i64 *out);
|
||||||
t_error _unary_op_plus(t_ast_node self, t_state *state, t_i64 *out);
|
t_error _postfix_op_inc(t_ast_node self, t_state *state, t_i64 *out);
|
||||||
|
|
||||||
t_error _unary_op_minus(t_ast_node self, t_state *state, t_i64 *out);
|
t_error _unary_op_minus(t_ast_node self, t_state *state, t_i64 *out);
|
||||||
|
t_error _unary_op_plus(t_ast_node self, t_state *state, t_i64 *out);
|
||||||
|
|
||||||
t_ast_node _arith_binary_to_ast_node(t_ast_arithmetic_binary *self);
|
t_ast_node _arith_binary_to_ast_node(t_ast_arithmetic_binary *self);
|
||||||
|
t_ast_node _arith_expansion_to_ast_node(t_ast_arithmetic_expansion *self);
|
||||||
|
t_ast_node _arith_literal_to_ast_node(t_ast_arithmetic_literal *self);
|
||||||
|
t_ast_node _arith_postfix_to_ast_node(t_ast_arithmetic_postfix *self);
|
||||||
|
t_ast_node _arith_ternary_to_ast_node(t_ast_arithmetic_ternary *self);
|
||||||
|
t_ast_node _arith_unary_to_ast_node(t_ast_arithmetic_unary *self);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -6,17 +6,19 @@
|
||||||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/07/11 17:22:29 by maiboyer #+# #+# */
|
/* Created: 2024/07/11 17:22:29 by maiboyer #+# #+# */
|
||||||
/* Updated: 2024/07/31 15:33:50 by maiboyer ### ########.fr */
|
/* Updated: 2024/08/01 06:23:29 by maiboyer ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
#include "app/state.h"
|
#include "app/state.h"
|
||||||
#include "ast/ast.h"
|
#include "ast/ast.h"
|
||||||
|
#include "me/os/os.h"
|
||||||
|
#include "me/os/os.h"
|
||||||
#include "exec/run.h"
|
#include "exec/run.h"
|
||||||
#include "me/convert/numbers_to_str.h"
|
#include "me/convert/numbers_to_str.h"
|
||||||
#include "me/hashmap/hashmap_env.h"
|
#include "me/hashmap/hashmap_env.h"
|
||||||
#include "me/mem/mem.h"
|
#include "me/mem/mem.h"
|
||||||
#include "me/os/process.h"
|
#include "me/os/os.h"
|
||||||
#include "me/str/str.h"
|
#include "me/str/str.h"
|
||||||
#include "me/string/string.h"
|
#include "me/string/string.h"
|
||||||
#include "me/types.h"
|
#include "me/types.h"
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
# include "app/node.h"
|
# include "app/node.h"
|
||||||
# include "me/hashmap/hashmap_env.h"
|
# include "me/hashmap/hashmap_env.h"
|
||||||
# include "me/os/process.h"
|
# include "me/os/os.h"
|
||||||
# include "me/types.h"
|
# include "me/types.h"
|
||||||
|
|
||||||
typedef struct s_parser
|
typedef struct s_parser
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue