Fix space bug after del

Fix space bug after del
This commit is contained in:
unsigned00 2024-05-05 01:31:55 +08:00 committed by GitHub
parent fc96c896b0
commit 29e1d9640f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2351,13 +2351,10 @@ AST* parser_line2Ast(Parser* self, char* sLine) {
AST_setNodeAttr(oAst, "global", sGlobalList);
goto __block_matched;
}
if (strIsStartWith(sLineStart, "del ") ||
strIsStartWith(sLineStart, "del(")) {
if (strIsStartWith(sLineStart, "del")) {
sStmt = "";
char* sDelDir = NULL;
if (sLineStart[3] == '(') {
sDelDir = strsCut(&buffs, sLineStart, '(', ')');
} else {
char* sDelDir = strsCut(&buffs, sLineStart, '(', ')');
if (!sDelDir){
sDelDir = sLineStart + sizeof("del ") - 1;
}
sDelDir = Cursor_getCleanStmt(&buffs, sDelDir);