diff --git a/ChangeLog b/ChangeLog index 95bcd220f..d5dc50d3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 + * Tools/AGSParser.m: Ignore forward declarations of protocols. 2003-05-05 15:28 Alexander Malmberg diff --git a/Tools/AGSParser.m b/Tools/AGSParser.m index 513185fc5..dab4d4342 100644 --- a/Tools/AGSParser.m +++ b/Tools/AGSParser.m @@ -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];