Skip to content

Commit

Permalink
Merge pull request #3689 from b4n/autoit-cat
Browse files Browse the repository at this point in the history
AutoIt: Slightly optimize parsing #region
  • Loading branch information
masatake authored Apr 3, 2023
2 parents 1aca3d5 + 022e26b commit 2bb6279
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions parsers/autoit.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,15 +190,13 @@ static void findAutoItTags (void)
else if (match (p, "region", &p))
{
skipSpaces (&p);
while (*p != '\0')
{
vStringPut (name, (int) *p);
++p;
}

if (vStringLength(name) > 0)
if (*p != '\0')
{
int k = makeSimpleAutoItTag (nls, name, K_REGION);
int k;

vStringCatS (name, (const char *) p);
k = makeSimpleAutoItTag (nls, name, K_REGION);
nestingLevelsPush (nls, k);
vStringClear (name);
}
Expand Down

0 comments on commit 2bb6279

Please sign in to comment.