Merge branch 'main' of github.com:WHaffmans/minishell
This commit is contained in:
commit
fa04c4e265
@ -11,6 +11,7 @@
|
|||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
#include "minishell.h"
|
#include "minishell.h"
|
||||||
|
#include "utils.h"
|
||||||
|
|
||||||
int main(int argc, char **argv, char **envp)
|
int main(int argc, char **argv, char **envp)
|
||||||
{
|
{
|
||||||
@ -28,7 +29,7 @@ int main(int argc, char **argv, char **envp)
|
|||||||
minishell->lexer = ft_lexer_new(minishell->line);
|
minishell->lexer = ft_lexer_new(minishell->line);
|
||||||
minishell->tokens = ft_parse_input(minishell->lexer);
|
minishell->tokens = ft_parse_input(minishell->lexer);
|
||||||
minishell->commands = parser_get_commands(minishell->tokens);
|
minishell->commands = parser_get_commands(minishell->tokens);
|
||||||
//ft_lstiter(minishell->tokens, print_list);
|
simple_builtins(minishell);
|
||||||
free_minishell_line(minishell);
|
free_minishell_line(minishell);
|
||||||
ft_lstclear(&minishell->commands, free_command_list);
|
ft_lstclear(&minishell->commands, free_command_list);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,24 +0,0 @@
|
|||||||
/* ************************************************************************** */
|
|
||||||
/* */
|
|
||||||
/* :::::::: */
|
|
||||||
/* print_list.c :+: :+: */
|
|
||||||
/* +:+ */
|
|
||||||
/* By: whaffman <whaffman@student.codam.nl> +#+ */
|
|
||||||
/* +#+ */
|
|
||||||
/* Created: 2025/02/05 16:12:14 by whaffman #+# #+# */
|
|
||||||
/* Updated: 2025/02/05 16:12:45 by whaffman ######## odam.nl */
|
|
||||||
/* */
|
|
||||||
/* ************************************************************************** */
|
|
||||||
|
|
||||||
#include "minishell.h"
|
|
||||||
|
|
||||||
void print_list(void *content)
|
|
||||||
{
|
|
||||||
t_token *token;
|
|
||||||
|
|
||||||
token = (t_token *)content;
|
|
||||||
if (token->type != T_ERROR)
|
|
||||||
ft_printf("%s\n", token->value);
|
|
||||||
else
|
|
||||||
ft_printf("unexpected token at position %i\n", token->position);
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user