浏览代码

fcl-passrc: paswrite: more Delphi compatible order for directives.

git-svn-id: trunk@38019 -
maciej-izak 7 年之前
父节点
当前提交
1c149202d8
共有 1 个文件被更改,包括 5 次插入4 次删除
  1. 5 4
      packages/fcl-passrc/src/paswrite.pp

+ 5 - 4
packages/fcl-passrc/src/paswrite.pp

@@ -808,6 +808,11 @@ begin
     WriteType(TPasFunctionType(AProc.ProcType).ResultEl.ResultType,False);
     WriteType(TPasFunctionType(AProc.ProcType).ResultEl.ResultType,False);
   end;
   end;
   Add(';');
   Add(';');
+  // delphi compatible order for example: procedure foo; reintroduce; overload; static;
+  if not IsImpl and AProc.IsReintroduced then
+    Add(' reintroduce;');
+  if AProc.IsOverload then
+    Add(' overload;');
   if not IsImpl then
   if not IsImpl then
     begin
     begin
     if AProc.IsVirtual then
     if AProc.IsVirtual then
@@ -818,15 +823,11 @@ begin
       Add(' abstract;');
       Add(' abstract;');
     if AProc.IsOverride then
     if AProc.IsOverride then
       Add(' override;');
       Add(' override;');
-    if AProc.IsReintroduced then
-      Add(' reintroduce;');
     if AProc.IsStatic then
     if AProc.IsStatic then
       Add(' static;');
       Add(' static;');
     end;
     end;
   if pmAssembler in AProc.Modifiers then
   if pmAssembler in AProc.Modifiers then
     Add(' assembler;');
     Add(' assembler;');
-  if AProc.IsOverload then
-    Add(' overload;');
   if AProc.CallingConvention<>ccDefault then
   if AProc.CallingConvention<>ccDefault then
     Add(' '+cCallingConventions[AProc.CallingConvention]+';');
     Add(' '+cCallingConventions[AProc.CallingConvention]+';');
   If Assigned(AProc.LibraryExpr) or Assigned(AProc.LibrarySymbolName) then
   If Assigned(AProc.LibraryExpr) or Assigned(AProc.LibrarySymbolName) then