mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Minor fix parsing declarations.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/branches/freeze-1_6_0@16088 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c7a095e931
commit
5b9b574cc9
2 changed files with 29 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
2003-02-28 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Tools/AGSParser.m: Fix to understand __attribute__() in declaration.
|
||||
|
||||
2003-02-27 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Tools/AGSIndex.m: Convert nil content to empty strings before use.
|
||||
|
|
|
@ -1344,6 +1344,31 @@
|
|||
}
|
||||
}
|
||||
|
||||
if (buffer[pos] == '_')
|
||||
{
|
||||
NSString *ident = [self parseIdentifier];
|
||||
|
||||
if ([ident isEqualToString: @"__attribute__"] == YES)
|
||||
{
|
||||
[self skipSpaces];
|
||||
if (pos < length && buffer[pos] == '(')
|
||||
{
|
||||
[self skipBlock];
|
||||
[self skipSpaces];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
[self log: @"Underscore is not from __attribute__"];
|
||||
goto fail;
|
||||
}
|
||||
if (pos >= length)
|
||||
{
|
||||
[self log: @"Unexpected end of declaration"];
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
|
||||
if (buffer[pos] == ';')
|
||||
{
|
||||
[self skipStatement];
|
||||
|
|
Loading…
Reference in a new issue