Skip to content

Commit

Permalink
Fixup for __attribute__ before variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
rfm committed Nov 20, 2023
1 parent 3b3687a commit 69dbfb6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Tools/AGSParser.m
Original file line number Diff line number Diff line change
Expand Up @@ -1925,6 +1925,16 @@ - (NSMutableArray*) parseDeclarations
[d setObject: @"Variables" forKey: @"Kind"];
}

/* If there is an attribute before the variable name we must ignore it.
*/
if ([s isEqualToString: @"__attribute__"])
{
if ([self skipSpaces] < length && buffer[pos] == '(')
{
[self skipBlock]; // Skip the attributes
}
}

if (s == nil)
{
[self parseDeclaratorInto: d];
Expand Down

0 comments on commit 69dbfb6

Please sign in to comment.