From 14ec232bb3817431c78caaf46844e1e866cea1c9 Mon Sep 17 00:00:00 2001 From: lyon1998 Date: Sun, 3 Apr 2022 12:40:06 +0800 Subject: [PATCH] clear check ')' --- src/PikaParser.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/PikaParser.c b/src/PikaParser.c index 3dc400812..fa0807551 100644 --- a/src/PikaParser.c +++ b/src/PikaParser.c @@ -902,19 +902,12 @@ AST* AST_parseStmt(AST* ast, char* stmt) { subStmts = strsAppend(&buffs, subStmts, ","); /* init process values */ Arg* subStmt = arg_setStr(NULL, "", ""); - uint8_t is_in_brankets = 0; /* start iteration */ char* subStmt_str = NULL; ParserState_forEachToken(ps, subStmts) { ParserState_iterStart(&ps); /* parse process */ - if (strEqu(ps.token1.pyload, "(")) { - is_in_brankets++; - } - if (strEqu(ps.token1.pyload, ")")) { - is_in_brankets--; - } - if (is_in_brankets > 0) { + if (ps.branket_deepth > 0) { /* in brankets */ /* append token to subStmt */ subStmt = arg_strAppend(subStmt, ps.token1.pyload);