fix: syntax error on pipe at start was not being detected
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user