* GormObjCHeaderParser/OCIVar.m

* GormObjCHeaderParser/ParserFunctions.h
	* GormObjCHeaderParser/ParserFunctions.m: Correction for 
	bug #23889.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@26796 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2008-07-20 13:35:32 +00:00
parent 090f40d417
commit 31c6238394
4 changed files with 33 additions and 1 deletions

View file

@ -1,3 +1,10 @@
2008-07-20 09:32-EDT Gregory John Casamento <greg_casamento@yahoo.com>
* GormObjCHeaderParser/OCIVar.m
* GormObjCHeaderParser/ParserFunctions.h
* GormObjCHeaderParser/ParserFunctions.m: Correction for
bug #23889.
2008-06-24 19:18-EDT Gregory John Casamento <greg_casamento@yahoo.com>
* GormCore/GormWrapperBuilder.h

View file

@ -104,7 +104,7 @@
[scanner scanUpToCharactersFromSet: wsnl intoString: &tempName]; // variable name...
[self setIsOutlet: YES];
}
else if(lookAhead(ivarString, @"id"))
else if(lookAheadForToken(ivarString, @"id"))
{
[scanner scanUpToCharactersFromSet: wsnl intoString: NULL]; // id
[scanner scanCharactersFromSet: wsnl intoString: NULL];

View file

@ -28,5 +28,6 @@
#include <Foundation/NSString.h>
BOOL lookAhead(NSString *stringToScan, NSString *stringToFind);
BOOL lookAheadForToken(NSString *stringToScan, NSString *stringToFind);
#endif

View file

@ -32,3 +32,27 @@ BOOL lookAhead(NSString *stringToScan, NSString *stringToFind)
NSMakeRange(NSNotFound,0)) == NO);
}
BOOL lookAheadForToken(NSString *stringToScan, NSString *stringToFind)
{
NSScanner *scanner = [NSScanner scannerWithString: stringToScan];
NSString *resultString = [NSString stringWithString: @""];
[scanner setCharactersToBeSkipped: nil];
[scanner scanString: stringToFind intoString: &resultString];
if([resultString isEqualToString: stringToFind])
{
NSString *postTokenString = [NSString stringWithString: @""];
NSCharacterSet *wsnl = [NSCharacterSet whitespaceAndNewlineCharacterSet];
[scanner scanCharactersFromSet: wsnl intoString: &postTokenString];
if([postTokenString length] == 0)
{
return NO;
}
return YES;
}
return NO;
}