update: normed lots of stuff
This commit is contained in:
parent
978636b6ef
commit
50a2f3d4be
118 changed files with 1145 additions and 1330 deletions
|
|
@ -6,13 +6,13 @@
|
|||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/09/06 16:31:41 by rparodi #+# #+# */
|
||||
/* Updated: 2024/09/13 18:15:08 by rparodi ### ########.fr */
|
||||
/* Updated: 2024/09/19 17:32:56 by maiboyer ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "app/colors.h"
|
||||
#include "app/env.h"
|
||||
#include "app/node.h"
|
||||
//#include "app/node.h"
|
||||
#include "app/signal_handler.h"
|
||||
#include "app/state.h"
|
||||
#include "ast/ast.h"
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
void ft_exit(t_state *maiboyerlpb, t_u8 exit_status);
|
||||
void print_node_data(t_node *t, t_usize depth);
|
||||
t_node parse_str(t_state *state);
|
||||
void parse_str(t_state *state);
|
||||
t_language *tree_sitter_sh(void);
|
||||
|
||||
t_error get_user_input(t_state *state)
|
||||
|
|
@ -60,7 +60,6 @@ void exec_shcat(t_state *state)
|
|||
t_program_result prog_res;
|
||||
|
||||
prog_res = (t_program_result){.exit = 0};
|
||||
free_node(state->current_node);
|
||||
if (state->ast != NULL && run_program(\
|
||||
&state->ast->data.program, state, &prog_res))
|
||||
printf("Error when execting the Command \n");
|
||||
|
|
@ -77,15 +76,15 @@ void ft_take_args(t_state *state)
|
|||
if (state->str_input == NULL)
|
||||
ft_exit(state, 0);
|
||||
line_history_add(state->str_input);
|
||||
state->current_node = parse_str(state);
|
||||
parse_str(state);
|
||||
exec_shcat(state);
|
||||
mem_free(state->str_input);
|
||||
}
|
||||
}
|
||||
|
||||
t_first_parser *create_myparser(void)
|
||||
t_parser *create_myparser(void)
|
||||
{
|
||||
t_first_parser *parser;
|
||||
t_parser *parser;
|
||||
|
||||
parser = ts_parser_new(tree_sitter_sh());
|
||||
return (parser);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue