From ab6061e72a2c1cbff6e7d8320ca4ac7920d72437 Mon Sep 17 00:00:00 2001 From: tekClovis Date: Fri, 9 May 2025 15:38:44 +0200 Subject: [PATCH] [FIX] parennthesis --- src/ast/tokeniser.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ast/tokeniser.c b/src/ast/tokeniser.c index 0d7e7eb..38dc906 100644 --- a/src/ast/tokeniser.c +++ b/src/ast/tokeniser.c @@ -155,8 +155,11 @@ void format_for_closable(ast_ctx_t *ctx, token_t *actual_token) if (actual_token->type == T_RIGHT_PARENT) *actual_token = handle_token_type(ctx); if (actual_token->type == T_LEFT_PARENT && - ctx->parsed_tok == 1) + ctx->parsed_tok == 1){ *actual_token = (token_t){ 0, NULL, 0 }; + while (*ctx->str != '\0' && isblank(*ctx->str)) + ctx->str++; + } if (actual_token->type == T_LEFT_PARENT && ctx->parsed_tok != 1) *actual_token = (token_t){ T_RIGHT_PARENT, ")", 1};