Browse Source

* support A1,A2,A4,A8 directives

git-svn-id: trunk@1488 -
peter 20 năm trước cách đây
mục cha
commit
e23519c45b
3 tập tin đã thay đổi với 42 bổ sung0 xóa
  1. 1 0
      .gitattributes
  2. 24 0
      compiler/scandir.pas
  3. 17 0
      tests/webtbs/tw4330.pp

+ 1 - 0
.gitattributes

@@ -6322,6 +6322,7 @@ tests/webtbs/tw4277.pp svneol=native#text/plain
 tests/webtbs/tw4290.pp svneol=native#text/plain
 tests/webtbs/tw4294.pp svneol=native#text/plain
 tests/webtbs/tw4308.pp svneol=native#text/plain
+tests/webtbs/tw4330.pp svneol=native#text/plain
 tests/webtbs/tw4332.pp svneol=native#text/plain
 tests/webtbs/tw4336.pp svneol=native#text/plain
 tests/webtbs/tw4350.pp svneol=native#text/plain

+ 24 - 0
compiler/scandir.pas

@@ -182,6 +182,26 @@ implementation
          end;
       end;
 
+    procedure dir_a1;
+      begin
+        aktpackrecords:=1;
+      end;
+
+    procedure dir_a2;
+      begin
+        aktpackrecords:=2;
+      end;
+
+    procedure dir_a4;
+      begin
+        aktpackrecords:=4;
+      end;
+
+    procedure dir_a8;
+      begin
+        aktpackrecords:=8;
+      end;
+
     procedure dir_asmmode;
       var
         s : string;
@@ -1077,6 +1097,10 @@ implementation
 
     procedure InitScannerDirectives;
       begin
+        AddDirective('A1',directive_all, @dir_a1);
+        AddDirective('A2',directive_all, @dir_a2);
+        AddDirective('A4',directive_all, @dir_a4);
+        AddDirective('A8',directive_all, @dir_a8);
         AddDirective('ALIGN',directive_all, @dir_align);
 {$ifdef m68k}
         AddDirective('APPID',directive_all, @dir_appid);

+ 17 - 0
tests/webtbs/tw4330.pp

@@ -0,0 +1,17 @@
+{ %opt=-Sew }
+
+{$A+}
+{$A-}
+{$A1}
+{$A2}
+{$A4}
+{$A8}
+{$ALIGN ON}
+{$ALIGN OFF}
+{$ALIGN 1}
+{$ALIGN 2}
+{$ALIGN 4}
+{$ALIGN 8}
+
+begin
+end.