From f07090eb442f6eca7ffe37adbdafe6b8d696fed4 Mon Sep 17 00:00:00 2001 From: CaS Date: Tue, 6 May 2003 10:11:22 +0000 Subject: [PATCH] Ignore forward declaration of protocol git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@16645 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 1 + Tools/AGSParser.m | 12 ++++++++++++ 2 files changed, 13 insertions(+) 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];