mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-29 17:22:56 +08:00
clear check ')'
This commit is contained in:
parent
e806df1583
commit
14ec232bb3
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user