Skip to content

Commit

Permalink
regression #7105 correct counting for group close counting
Browse files Browse the repository at this point in the history
In case of an extra closing we should not count this closing as otherwise sequences like:
```
  @}
  ...
  @{
  ...
  @}
```
will give a warning at both `@}` statements and not just at the first (second one has an opening statement_.
  • Loading branch information
albert-github committed Jul 10, 2019
1 parent 34c9bac commit a2eb1df
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/commentscan.l
Original file line number Diff line number Diff line change
Expand Up @@ -3361,6 +3361,7 @@ void closeGroup(Entry *e,const char *fileName,int line,bool foundInline)
g_openCount--;
if (g_openCount < 0)
{
g_openCount++; // undo an extra non existing specified level
warn(fileName,line,"unbalanced grouping commands");
}
//printf("==> closeGroup(name=%s,sec=%x,file=%s,line=%d) g_autoGroupStack=%d\n",
Expand Down

0 comments on commit a2eb1df

Please sign in to comment.