diff --git a/src/parser/parser.c b/src/parser/parser.c index 951c079..6edcc4a 100644 --- a/src/parser/parser.c +++ b/src/parser/parser.c @@ -80,6 +80,8 @@ static t_list *parse_tokens( return (NULL); commands = NULL; current_token = tokens; + if (((t_token *)current_token->content)->type == TOKEN_PIPE) + return (syntax_error_unexpected_token((t_token *)current_token->content), NULL); while (current_token != NULL) { command = command_new(¤t_token);