From 27531d3a48d4f2d73df9b917352789391582035e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Luk=C3=A1=C5=A1=20Ji=C5=99i=C5=A1t=C4=9B?= Date: Wed, 28 Aug 2024 10:34:29 +0200 Subject: [PATCH] Make variable assignment possible in subshell Because of ASSIGNMENT_WORD filtering, subshell needs a special rule (the same as AND_IF, OR_IF) to permit variable assignment to be recognized imediatelly after subshell starts. --- src/tokenization.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tokenization.c b/src/tokenization.c index d41179d..5f5114a 100644 --- a/src/tokenization.c +++ b/src/tokenization.c @@ -6,7 +6,7 @@ /* By: ljiriste +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/06/21 16:34:43 by ljiriste #+# #+# */ -/* Updated: 2024/08/27 13:36:27 by ljiriste ### ########.fr */ +/* Updated: 2024/08/28 10:32:02 by ljiriste ### ########.fr */ /* */ /* ************************************************************************** */ @@ -211,7 +211,8 @@ void filter_assignment_word(t_vec *tokens) prev_token = ft_vec_caccess(tokens, i - 1); if (prev_token->type == g_tokens[ASSIGNMENT_WORD] || prev_token->type == g_tokens[AND_IF] - || prev_token->type == g_tokens[OR_IF]) + || prev_token->type == g_tokens[OR_IF] + || prev_token->type == g_tokens[LPARA]) { ++i; continue ; -- 2.30.2