Skip to content

Commit

Permalink
Ignore preprocessor directives when parsing declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
rfm committed Oct 23, 2023
1 parent 77d0898 commit 2e37405
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Tools/AGSParser.m
Original file line number Diff line number Diff line change
Expand Up @@ -2025,6 +2025,11 @@ - (NSMutableDictionary*) parseDeclaration
pos++; // Ignore extraneous '}'
[self skipSpaces];
}
else if (buffer[pos] == '#')
{
[self parsePreprocessor]; // Ignore preprocessor directive.
DESTROY(comment);
}
else
{
[self log: @"Unexpected char (%c) in declaration", buffer[pos]];
Expand Down

0 comments on commit 2e37405

Please sign in to comment.