tokenizer but the pressisons

This commit is contained in:
Nathan Lebrun
2025-01-20 16:09:48 +01:00
parent 9ee0c5bf2d
commit 2f97574a37
3 changed files with 49 additions and 10 deletions

View File

@@ -11,6 +11,7 @@
/* ************************************************************************** */
#include "tokenizer/tokenizer.h"
/*#include "../includes/env.h"*/
void truncate_comment(char *str)
{
@@ -30,18 +31,28 @@ void truncate_comment(char *str)
}
}
int main(int ac, char **av)
/*static t_data *init_data(char **envp)*/
/*{*/
/* t_data *data;*/
/**/
/* data = malloc (sizeof(t_data));*/
/* data->env = init_env(envp);*/
/* return (data);*/
/*}*/
int main(int ac, char **av, char **envp)
{
t_node *lst;
char *expanded;
(void)ac;
(void)envp;
/*t_data data;*/
/*data = init_data(envp);*/
truncate_comment(av[1]);
expanded = expander(av[1]);
lst = tokenize(expanded);
lst = tokenize(av[1]);
if (!lst)
return (free(expanded), 1);
ft_free(expanded);
return (1);
debug_linked_list(lst, "Tokenized");
free_linked_list(lst);
}