Skip to content

Commit

Permalink
Merge pull request #340 from unsigned00/patch-1
Browse files Browse the repository at this point in the history
Fix space bug after del
  • Loading branch information
pikasTech authored May 4, 2024
2 parents fc96c89 + 29e1d96 commit 7e1b47b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/PikaParser.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7e1b47b

Please sign in to comment.