- add freelist to minishell - add t_minishell *minishell to all function calling malloc_free - substituted all malloc calls but the first to malloc_safe
34 lines
1.5 KiB
C
34 lines
1.5 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* :::::::: */
|
|
/* tokenizer.h :+: :+: */
|
|
/* +:+ */
|
|
/* By: qmennen <qmennen@student.codam.nl> +#+ */
|
|
/* +#+ */
|
|
/* Created: 2025/02/05 12:36:00 by whaffman #+# #+# */
|
|
/* Updated: 2025/02/25 14:45:15 by whaffman ######## odam.nl */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#ifndef TOKENIZER_H
|
|
# define TOKENIZER_H
|
|
|
|
/**
|
|
* Lexer
|
|
*/
|
|
t_lexer *ft_lexer_new(t_minishell *minishell);
|
|
void ft_lexer_free(t_lexer *lexer);
|
|
void lexer_readchar(t_lexer *lexer);
|
|
char *lexer_readword(t_minishell *minishell, t_lexer *lexer);
|
|
t_list *ft_parse_input(t_minishell *minishell);
|
|
/**
|
|
* Token
|
|
*/
|
|
t_token *ft_token_next(t_minishell *minishell, t_lexer *lexer);
|
|
t_token *token_new(t_minishell *minishell, t_token_type type, char *c, int pos);
|
|
void ft_token_free(t_token *token);
|
|
void ft_clear_tokenlist(void *content);
|
|
t_token *token_parse(t_minishell *minishell, t_lexer *lexer);
|
|
|
|
#endif // TOKENIZER_H
|