codetools: TIdentCompletionTool.GatherPredefinedIdentifiers, fix case of some identifiers, add 4 more: Inc, Dec, Succ, Pred

git-svn-id: trunk@20864 -
This commit is contained in:
paul 2009-07-15 12:51:58 +00:00
parent 6e06aafd15
commit ccd58a5611

View File

@ -1085,25 +1085,29 @@ var
ProcNode: TCodeTreeNode; ProcNode: TCodeTreeNode;
begin begin
if Context.Node.Desc in AllPascalStatements then begin if Context.Node.Desc in AllPascalStatements then begin
AddCompilerProcedure('SetLength','array of type; NewLength: integer'); AddCompilerProcedure('SetLength','array of type; NewLength: Integer');
AddCompilerFunction('Copy','const s: string; FromPosition, Count: integer', 'string'); AddCompilerFunction('Copy','const s: String; FromPosition, Count: Integer', 'String');
AddCompilerProcedure('Write','Args : Arguments'); AddCompilerProcedure('Write','Args : Arguments');
AddCompilerProcedure('WriteLn','Args : Arguments'); AddCompilerProcedure('WriteLn','Args : Arguments');
AddCompilerProcedure('Read',''); AddCompilerProcedure('Read','');
AddCompilerProcedure('ReadLn',''); AddCompilerProcedure('ReadLn','');
AddCompilerFunction('Length','array of type','ordinal'); AddCompilerFunction('Length','array of type','Ordinal');
AddCompilerFunction('High','Argument','ordinal'); AddCompilerFunction('High','Argument','Ordinal');
AddCompilerFunction('Low','Argument','ordinal'); AddCompilerFunction('Low','Argument','Ordinal');
AddCompilerFunction('SizeOf','identifier','ordinal'); AddCompilerFunction('SizeOf','identifier','ordinal');
AddCompilerProcedure('Include','set of enum; enum'); AddCompilerProcedure('Include','set of enum; enum');
AddCompilerProcedure('Exclude','set of enum; enum'); AddCompilerProcedure('Exclude','set of enum; enum');
AddCompilerProcedure('Assigned','pointer'); AddCompilerProcedure('Assigned','Pointer');
AddCompilerProcedure('Dispose','pointer'); AddCompilerProcedure('Dispose','Pointer');
AddCompilerProcedure('New','pointer'); AddCompilerProcedure('New','Pointer');
AddCompilerProcedure('Assert','boolean; const message: string'); AddCompilerProcedure('Assert','Boolean; const Message: String');
AddCompilerProcedure('exit',''); AddCompilerProcedure('Exit','');
AddCompilerProcedure('continue',''); AddCompilerProcedure('Continue','');
AddCompilerProcedure('break',''); AddCompilerProcedure('Break','');
AddCompilerProcedure('Inc','var X: Ordinal; N: Integer = 1');
AddCompilerProcedure('Dec','var X: Ordinal; N: Integer = 1');
AddCompilerFunction('Succ','X: Ordinal', 'Ordinal');
AddCompilerFunction('Pred','X: Ordinal', 'Ordinal');
if Context.Tool.NodeIsInAMethod(Context.Node) if Context.Tool.NodeIsInAMethod(Context.Node)
and (not CurrentIdentifierList.HasIdentifier('Self','')) then begin and (not CurrentIdentifierList.HasIdentifier('Self','')) then begin