codetools: support for *experimental* and *library* hint modifiers

git-svn-id: trunk@22206 -
This commit is contained in:
paul 2009-10-17 13:56:39 +00:00
parent 01f55ab286
commit 5dd9571ffc
2 changed files with 10 additions and 4 deletions

View File

@ -775,6 +775,8 @@ begin
Add('UNIMPLEMENTED',{$ifdef FPC}@{$endif}AllwaysTrue); Add('UNIMPLEMENTED',{$ifdef FPC}@{$endif}AllwaysTrue);
Add('VIRTUAL' ,{$ifdef FPC}@{$endif}AllwaysTrue); Add('VIRTUAL' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('PASCAL' ,{$ifdef FPC}@{$endif}AllwaysTrue); Add('PASCAL' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('EXPERIMENTAL' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('LIBRARY' ,{$ifdef FPC}@{$endif}AllwaysTrue);
end; end;
IsKeyWordProcedureSpecifier:=TKeyWordFunctionList.Create; IsKeyWordProcedureSpecifier:=TKeyWordFunctionList.Create;

View File

@ -3459,7 +3459,8 @@ begin
end; end;
if CurPos.Flag=cafEND then begin if CurPos.Flag=cafEND then begin
ReadNextAtom; ReadNextAtom;
if UpAtomIs('DEPRECATED') or UpAtomIs('PLATFORM') or UpAtomIs('UNIMPLEMENTED') if UpAtomIs('DEPRECATED') or UpAtomIs('PLATFORM') or UpAtomIs('UNIMPLEMENTED') or
UpAtomIs('EXPERIMENTAL') or UpAtomIs('LIBRARY')
then then
ReadNextAtom; ReadNextAtom;
if CurPos.Flag=cafSemicolon then if CurPos.Flag=cafSemicolon then
@ -3534,7 +3535,8 @@ begin
end; end;
if CurPos.Flag=cafEND then begin if CurPos.Flag=cafEND then begin
ReadNextAtom; ReadNextAtom;
if UpAtomIs('DEPRECATED') or UpAtomIs('PLATFORM') or UpAtomIs('UNIMPLEMENTED') if UpAtomIs('DEPRECATED') or UpAtomIs('PLATFORM') or UpAtomIs('UNIMPLEMENTED') or
UpAtomIs('EXPERIMENTAL') or UpAtomIs('LIBRARY')
then then
ReadNextAtom; ReadNextAtom;
end; end;
@ -3796,7 +3798,8 @@ begin
SaveRaiseException(ctsInvalidSubrange); SaveRaiseException(ctsInvalidSubrange);
CurNode.EndPos:=CurPos.StartPos; CurNode.EndPos:=CurPos.StartPos;
end; end;
if UpAtomIs('PLATFORM') or UpAtomIs('DEPRECATED') or UpAtomIs('UNIMPLEMENTED') if UpAtomIs('PLATFORM') or UpAtomIs('DEPRECATED') or UpAtomIs('UNIMPLEMENTED') or
UpAtomIs('EXPERIMENTAL') or UpAtomIs('LIBRARY')
then then
ReadNextAtom; ReadNextAtom;
end else begin end else begin
@ -3902,7 +3905,8 @@ begin
CurNode.EndPos:=CurPos.EndPos; CurNode.EndPos:=CurPos.EndPos;
EndChildNode; // close record EndChildNode; // close record
ReadNextAtom; ReadNextAtom;
if UpAtomIs('PLATFORM') or UpAtomIs('DEPRECATED') or UpAtomIs('UNIMPLEMENTED') if UpAtomIs('PLATFORM') or UpAtomIs('DEPRECATED') or UpAtomIs('UNIMPLEMENTED') or
UpAtomIs('EXPERIMENTAL') or UpAtomIs('LIBRARY')
then then
ReadNextAtom; ReadNextAtom;
Result:=true; Result:=true;