mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-21 17:59:31 +02:00
codetools: add Default compiler magic
git-svn-id: trunk@51353 -
This commit is contained in:
parent
7c9c153453
commit
696ae12a21
@ -9470,8 +9470,10 @@ begin
|
||||
exit;
|
||||
ParamList:=CreateParamExprListFromStatement(CurPos.StartPos,Params);
|
||||
if (CompareIdentifiers(IdentPos,'PREC')=0)
|
||||
or (CompareIdentifiers(IdentPos,'SUCC')=0) then begin
|
||||
// the PREC and SUCC of a expression has the same type as the expression
|
||||
or (CompareIdentifiers(IdentPos,'SUCC')=0)
|
||||
or (CompareIdentifiers(IdentPos,'DEFAULT')=0)
|
||||
then begin
|
||||
// the DEFAULT, PREC and SUCC of a expression has the same type as the expression
|
||||
if ParamList.Count<>1 then exit;
|
||||
Result:=ParamList.Items[0];
|
||||
end
|
||||
|
@ -1383,6 +1383,7 @@ begin
|
||||
AddCompilerProcedure('Continue','');
|
||||
AddCompilerFunction('Copy','const S:String;FromPosition,Count:Integer', 'String');
|
||||
AddCompilerProcedure('Dec','var X:Ordinal;N:Integer=1');
|
||||
AddCompilerFunction('Default','T:Type','const');
|
||||
AddCompilerProcedure('Dispose','var X:Pointer');
|
||||
AddCompilerProcedure('Exclude','var S:Set;X:Ordinal');
|
||||
AddCompilerProcedure('Exit','');
|
||||
@ -2911,6 +2912,7 @@ var
|
||||
AddCompilerProc('Concat','S1:String;S2:String[...;Sn:String]', 'String');
|
||||
AddCompilerProc('Copy','const S:String;FromPosition,Count:Integer', 'String');
|
||||
AddCompilerProc('Dec','var X:Ordinal;N:Integer=1');
|
||||
AddCompilerProc('Default','T:Type','const');
|
||||
AddCompilerProc('Dispose','var X:Pointer');
|
||||
AddCompilerProc('Exclude','var S:Set;X:Ordinal');
|
||||
AddCompilerProc('Exit','ResultValue:Ordinal=Result');
|
||||
|
@ -1245,6 +1245,7 @@ begin
|
||||
Add('SETLENGTH' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||
Add('INC' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||
Add('DEC' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||
Add('DEFAULT' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||
Add('INITIALIZE' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||
Add('FINALIZE' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||
Add('COPY' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||
|
Loading…
Reference in New Issue
Block a user