Explorar el Código

+ introduce iso mode

git-svn-id: trunk@15677 -
florian hace 15 años
padre
commit
ced4f95c56
Se han modificado 3 ficheros con 10 adiciones y 5 borrados
  1. 2 0
      compiler/globals.pas
  2. 2 2
      compiler/globtype.pas
  3. 6 3
      compiler/scanner.pas

+ 2 - 0
compiler/globals.pas

@@ -69,6 +69,8 @@ interface
 {$endif}
        macmodeswitches =
          [m_mac,m_all,m_result,m_cvar_support,m_mac_procvar];
+       isomodeswitches =
+         [m_iso,m_all,m_tp_procvar,m_duplicate_names];
 
        { maximum nesting of routines }
        maxnesting = 32;

+ 2 - 2
compiler/globtype.pas

@@ -245,7 +245,7 @@ interface
        { Switches which can be changed by a mode (fpc,tp7,delphi) }
        tmodeswitch = (m_none,m_all, { needed for keyword }
          { generic }
-         m_fpc,m_objfpc,m_delphi,m_tp7,m_mac,
+         m_fpc,m_objfpc,m_delphi,m_tp7,m_mac,m_iso,
          {$ifdef fpc_mode}m_gpc,{$endif}
          { more specific }
          m_class,               { delphi class model }
@@ -364,7 +364,7 @@ interface
 {$endif}
 
        modeswitchstr : array[tmodeswitch] of string[18] = ('','',
-         '','','','','',
+         '','','','','','',
          {$ifdef fpc_mode}'',{$endif}
          { more specific }
          'CLASS',

+ 6 - 3
compiler/scanner.pas

@@ -346,6 +346,9 @@ implementation
         else
          if s='MACPAS' then
           current_settings.modeswitches:=macmodeswitches
+        else
+         if s='ISO' then
+          current_settings.modeswitches:=isomodeswitches
         else
          b:=false;
 
@@ -359,8 +362,8 @@ implementation
 
            HandleModeSwitches(changeinit);
 
-           { turn on bitpacking for mode macpas }
-           if (m_mac in current_settings.modeswitches) then
+           { turn on bitpacking for mode macpas and iso pascal }
+           if ([m_mac,m_iso] * current_settings.modeswitches <> []) then
              begin
                include(current_settings.localswitches,cs_bitpacking);
                if changeinit then
@@ -368,7 +371,7 @@ implementation
              end;
 
            { support goto/label by default in delphi/tp7/mac modes }
-           if ([m_delphi,m_tp7,m_mac] * current_settings.modeswitches <> []) then
+           if ([m_delphi,m_tp7,m_mac,m_iso] * current_settings.modeswitches <> []) then
              begin
                include(current_settings.moduleswitches,cs_support_goto);
                if changeinit then