Ignore forward declaration of protocol

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@16645 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2003-05-06 10:11:22 +00:00
parent 36cebef8a6
commit fa5d670af1
2 changed files with 13 additions and 0 deletions

View file

@ -7,6 +7,7 @@
* Source/NSData.m: Remove windows specific code for simplification
as the standard code actually works as well or better according to
<Roland.Schwingel@onevision.de>
* Tools/AGSParser.m: Ignore forward declarations of protocols.
2003-05-05 15:28 Alexander Malmberg <alexander@malmberg.org>

View file

@ -2910,6 +2910,18 @@ fail:
[self log: @"protocol with bad name"];
goto fail;
}
/*
* If there is a comma, this must be a forward declaration of a list
* of protocols ... so we can ignore it. Otherwise, if we found a
* semicolon, we have a single forward declaration to ignore.
*/
if (pos < length && (buffer[pos] == ',' || buffer[pos] == ';'))
{
[self skipStatement];
return nil;
}
[dict setObject: name forKey: @"Name"];
[self setStandards: dict];
unitName = [NSString stringWithFormat: @"(%@)", name];