mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-24 03:51:22 +00:00
Corrected problem with header parser.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@20703 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5454bafb52
commit
f016e032d8
2 changed files with 28 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2005-02-14 01:00 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||||
|
|
||||||
|
* GormObjCHeaderParser/OCIVarDecl.m: Corrected problem with
|
||||||
|
reading declarations which have the "*" spaced oddly. Problem
|
||||||
|
reported by Nicolas Roard.
|
||||||
|
|
||||||
2005-02-13 09:37 Gregory John Casamento <greg_casamento@yahoo.com>
|
2005-02-13 09:37 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||||
|
|
||||||
* GModelDecoder.m: After gmodel load, mark the document as
|
* GModelDecoder.m: After gmodel load, mark the document as
|
||||||
|
|
|
@ -63,6 +63,7 @@
|
||||||
NSScanner *stripScanner = [NSScanner scannerWithString: ivarString];
|
NSScanner *stripScanner = [NSScanner scannerWithString: ivarString];
|
||||||
NSString *resultString = nil;
|
NSString *resultString = nil;
|
||||||
NSString *tempString = [NSString stringWithString: @""];
|
NSString *tempString = [NSString stringWithString: @""];
|
||||||
|
NSString *tempString2 = [NSString stringWithString: @""];
|
||||||
NSCharacterSet *wsnl = [NSCharacterSet whitespaceAndNewlineCharacterSet];
|
NSCharacterSet *wsnl = [NSCharacterSet whitespaceAndNewlineCharacterSet];
|
||||||
NSString *typeName = [NSString stringWithString: @""];
|
NSString *typeName = [NSString stringWithString: @""];
|
||||||
NSString *varName = [NSString stringWithString: @""];
|
NSString *varName = [NSString stringWithString: @""];
|
||||||
|
@ -78,10 +79,28 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// strip protocol qualifiers
|
if(lookAhead(tempString, @"*"))
|
||||||
if(lookAhead(tempString,@"<"))
|
|
||||||
{
|
{
|
||||||
stripScanner = [NSScanner scannerWithString: tempString];
|
stripScanner = [NSScanner scannerWithString: tempString];
|
||||||
|
while(![stripScanner isAtEnd])
|
||||||
|
{
|
||||||
|
NSString *string = nil, *string2 = nil;
|
||||||
|
[stripScanner scanUpToString: @"*" intoString: &string];
|
||||||
|
[stripScanner scanString: @"*" intoString: NULL];
|
||||||
|
[stripScanner scanUpToCharactersFromSet: wsnl intoString: &string2];
|
||||||
|
tempString2 = [tempString2 stringByAppendingString: string];
|
||||||
|
tempString2 = [tempString2 stringByAppendingString: string2];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tempString2 = tempString;
|
||||||
|
}
|
||||||
|
|
||||||
|
// strip protocol qualifiers
|
||||||
|
if(lookAhead(tempString2,@"<"))
|
||||||
|
{
|
||||||
|
stripScanner = [NSScanner scannerWithString: tempString2];
|
||||||
[stripScanner scanUpToString: @"<" intoString: &typeName];
|
[stripScanner scanUpToString: @"<" intoString: &typeName];
|
||||||
[stripScanner scanUpToAndIncludingString: @">" intoString: NULL];
|
[stripScanner scanUpToAndIncludingString: @">" intoString: NULL];
|
||||||
[stripScanner scanUpToCharactersFromSet: wsnl intoString: &varName];
|
[stripScanner scanUpToCharactersFromSet: wsnl intoString: &varName];
|
||||||
|
@ -91,7 +110,7 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
resultString = tempString;
|
resultString = tempString2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSIGN(ivarString, resultString);
|
ASSIGN(ivarString, resultString);
|
||||||
|
|
Loading…
Reference in a new issue