mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-18 03:30:56 +00:00
Understand deprecation.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@19893 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
9bd10b5b4b
commit
54fc83a758
2 changed files with 37 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
||||||
* Tools/AGSParser.m: Destory comments after skipping units ...
|
* Tools/AGSParser.m: Destory comments after skipping units ...
|
||||||
we don't want them included as part of the documentation of the
|
we don't want them included as part of the documentation of the
|
||||||
next thing after the unit.
|
next thing after the unit.
|
||||||
|
Recognize __attribute__((deprecated)) and add a comment.
|
||||||
|
|
||||||
2004-08-20 David Ayers <d.ayers@inode.at>
|
2004-08-20 David Ayers <d.ayers@inode.at>
|
||||||
|
|
||||||
|
|
|
@ -1397,7 +1397,19 @@
|
||||||
{
|
{
|
||||||
if ([self skipSpaces] < length && buffer[pos] == '(')
|
if ([self skipSpaces] < length && buffer[pos] == '(')
|
||||||
{
|
{
|
||||||
|
unsigned start = pos;
|
||||||
|
NSString *attr;
|
||||||
|
|
||||||
[self skipBlock]; // Skip the attributes
|
[self skipBlock]; // Skip the attributes
|
||||||
|
attr = [NSString stringWithCharacters: buffer + start
|
||||||
|
length: pos - start];
|
||||||
|
if ([attr rangeOfString: @"deprecated"].length > 0)
|
||||||
|
{
|
||||||
|
[self appendComment: @"<em>Warning</em> this is "
|
||||||
|
@"<em>deprecated</em> and may be removed in "
|
||||||
|
@"future versions"
|
||||||
|
to: nil];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1419,7 +1431,19 @@
|
||||||
[self skipSpaces];
|
[self skipSpaces];
|
||||||
if (pos < length && buffer[pos] == '(')
|
if (pos < length && buffer[pos] == '(')
|
||||||
{
|
{
|
||||||
|
unsigned start = pos;
|
||||||
|
NSString *attr;
|
||||||
|
|
||||||
[self skipBlock];
|
[self skipBlock];
|
||||||
|
attr = [NSString stringWithCharacters: buffer + start
|
||||||
|
length: pos - start];
|
||||||
|
if ([attr rangeOfString: @"deprecated"].length > 0)
|
||||||
|
{
|
||||||
|
[self appendComment: @"<em>Warning</em> this is "
|
||||||
|
@"<em>deprecated</em> and may be removed in "
|
||||||
|
@"future versions"
|
||||||
|
to: nil];
|
||||||
|
}
|
||||||
[self skipSpaces];
|
[self skipSpaces];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1634,7 +1658,15 @@ fail:
|
||||||
}
|
}
|
||||||
else if ([token isEqual: @"implementation"] == YES)
|
else if ([token isEqual: @"implementation"] == YES)
|
||||||
{
|
{
|
||||||
[self parseImplementation];
|
if (isSource == YES)
|
||||||
|
{
|
||||||
|
[self parseImplementation];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[self skipUnit];
|
||||||
|
DESTROY(comment);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2637,6 +2669,7 @@ fail:
|
||||||
}
|
}
|
||||||
[exist setObject: @"YES" forKey: @"Implemented"];
|
[exist setObject: @"YES" forKey: @"Implemented"];
|
||||||
}
|
}
|
||||||
|
DESTROY(comment); // Don't want this.
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '@':
|
case '@':
|
||||||
|
@ -2663,6 +2696,7 @@ fail:
|
||||||
[self log: @"@method list with unknown directive '%@'", token];
|
[self log: @"@method list with unknown directive '%@'", token];
|
||||||
[self skipStatementLine];
|
[self skipStatementLine];
|
||||||
}
|
}
|
||||||
|
DESTROY(comment); // Don't want this.
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '#':
|
case '#':
|
||||||
|
@ -2688,6 +2722,7 @@ fail:
|
||||||
pos--;
|
pos--;
|
||||||
[self parseDeclaration];
|
[self parseDeclaration];
|
||||||
}
|
}
|
||||||
|
DESTROY(comment); // Don't want this.
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue