refactoring lexing
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2021/10/04 05:59:26 by lperrey #+# #+# */
|
||||
/* Updated: 2021/11/30 13:30:52 by lperrey ### ########.fr */
|
||||
/* Updated: 2021/12/01 14:45:04 by lperrey ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -27,17 +27,14 @@ void shell_loop(t_all *c)
|
||||
if (line_input && *line_input)
|
||||
{
|
||||
add_history(line_input);
|
||||
// Lexing
|
||||
c->token_list = input_to_tokens(line_input);
|
||||
c->token_list = lexing(line_input);
|
||||
ft_free_null(&line_input);
|
||||
if (!c->token_list)
|
||||
continue ;
|
||||
// Parsing
|
||||
c->pipeline = parsing(c->token_list);
|
||||
ft_lstclear((t_list **)&c->token_list, free);
|
||||
if (!c->pipeline)
|
||||
continue ;
|
||||
// Exec Pipeline
|
||||
exec_cmd_line(c);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user