From dc772d10c232ea755485726d923dda5f15f740d1 Mon Sep 17 00:00:00 2001 From: Sergio Date: Fri, 13 Feb 2026 13:48:28 +0100 Subject: [PATCH] fix: syntax error on pipe at start was not being detected --- src/parser/parser.c | 2 ++ 1 file changed, 2 insertions(+) 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);