mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-23 11:41:05 +00:00
Correction for bug#44343. Set to ready for test.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@38372 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
17ec30efb2
commit
3dc14cfc65
2 changed files with 34 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2015-03-02 00:04-EST Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* GormObjCHeaderParser/OCHeaderParser.m: Add _stripRedundantStatements
|
||||
method which eliminates excess empty statements from the code which
|
||||
could confuse the parser.
|
||||
|
||||
2015-02-22 21:21-EST Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* English.lproj/GormPreferences.gorm: Removed from pulldown menu
|
||||
|
|
|
@ -111,10 +111,38 @@
|
|||
ASSIGN(fileData,resultString);
|
||||
}
|
||||
|
||||
- (void) _stripRedundantStatements
|
||||
{
|
||||
NSScanner *scanner = [NSScanner scannerWithString: fileData];
|
||||
NSString *resultString = @""; // [NSString stringWithString: @""];
|
||||
|
||||
// strip all of the one line comments out...
|
||||
[scanner setCharactersToBeSkipped: nil];
|
||||
while(![scanner isAtEnd])
|
||||
{
|
||||
NSString *tempString = nil, *aString = nil;
|
||||
[scanner scanUpToAndIncludingString: @";" intoString: &tempString];
|
||||
|
||||
// Scan any redundant ";" characters into aString... once it
|
||||
// returns nil we know we're done.
|
||||
do {
|
||||
aString = nil;
|
||||
[scanner scanString: @";" intoString: &aString];
|
||||
} while([aString isEqualToString:@";"]);
|
||||
|
||||
[scanner scanUpToAndIncludingString: @"\n" intoString: NULL];
|
||||
resultString = [resultString stringByAppendingString: tempString];
|
||||
}
|
||||
|
||||
// make this our new fileData...
|
||||
ASSIGN(fileData,resultString);
|
||||
}
|
||||
|
||||
- (void) _preProcessFile
|
||||
{
|
||||
[self _stripComments];
|
||||
[self _stripPreProcessor];
|
||||
[self _stripRedundantStatements];
|
||||
}
|
||||
|
||||
- (BOOL) _processClasses
|
||||
|
|
Loading…
Reference in a new issue