Procházet zdrojové kódy

* made dir_warn code more clear, no implementation yet

git-svn-id: trunk@4200 -
florian před 19 roky
rodič
revize
57f097a710
4 změnil soubory, kde provedl 299 přidání a 287 odebrání
  1. 2 0
      compiler/msg/errore.msg
  2. 3 2
      compiler/msgidx.inc
  3. 281 278
      compiler/msgtxt.inc
  4. 13 7
      compiler/scandir.pas

+ 2 - 0
compiler/msg/errore.msg

@@ -341,6 +341,8 @@ scan_w_minstacksize_not_support=02077_W_MINSTACKSIZE is not supported by the tar
 % The \var{\{\$MINSTACKSIZE\}} directive is not supported by the target OS
 % The \var{\{\$MINSTACKSIZE\}} directive is not supported by the target OS
 scan_w_maxstacksize_not_support=02078_W_MAXSTACKSIZE is not supported by the target OS
 scan_w_maxstacksize_not_support=02078_W_MAXSTACKSIZE is not supported by the target OS
 % The \var{\{\$MAXSTACKSIZE\}} directive is not supported by the target OS
 % The \var{\{\$MAXSTACKSIZE\}} directive is not supported by the target OS
+scanner_e_illegal_warn_state=02079_E_Illegal state for $WARN directive
+% Only ON and OFF can be used as state with a $warn compiler directive
 % \end{description}
 % \end{description}
 #
 #
 # Parser
 # Parser

+ 3 - 2
compiler/msgidx.inc

@@ -99,6 +99,7 @@ const
   scan_w_imagebase_not_support=02076;
   scan_w_imagebase_not_support=02076;
   scan_w_minstacksize_not_support=02077;
   scan_w_minstacksize_not_support=02077;
   scan_w_maxstacksize_not_support=02078;
   scan_w_maxstacksize_not_support=02078;
+  scanner_e_illegal_warn_state=02079;
   parser_e_syntax_error=03000;
   parser_e_syntax_error=03000;
   parser_e_dont_nest_interrupt=03004;
   parser_e_dont_nest_interrupt=03004;
   parser_w_proc_directive_ignored=03005;
   parser_w_proc_directive_ignored=03005;
@@ -684,9 +685,9 @@ const
   option_info=11024;
   option_info=11024;
   option_help_pages=11025;
   option_help_pages=11025;
 
 
-  MsgTxtSize = 40246;
+  MsgTxtSize = 40288;
 
 
   MsgIdxMax : array[1..20] of longint=(
   MsgIdxMax : array[1..20] of longint=(
-    24,79,220,61,62,47,100,22,135,60,
+    24,80,220,61,62,47,100,22,135,60,
     41,1,1,1,1,1,1,1,1,1
     41,1,1,1,1,1,1,1,1,1
   );
   );

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 281 - 278
compiler/msgtxt.inc


+ 13 - 7
compiler/scandir.pas

@@ -1094,21 +1094,27 @@ implementation
           status.verbosity:=status.verbosity and (not V_Info);
           status.verbosity:=status.verbosity and (not V_Info);
       end;
       end;
 
 
+    { delphi compatible warn directive:
+      $warn <identifier> on
+      $warn <identifier> off
+      not implemented yet
+    }
     procedure dir_warn;
     procedure dir_warn;
       var
       var
         warning_string,state : string;
         warning_string,state : string;
       begin
       begin
         current_scanner.skipspace;
         current_scanner.skipspace;
         warning_string:=current_scanner.readid;
         warning_string:=current_scanner.readid;
-        if (upper(warning_string)='ON') then
+        current_scanner.skipspace;
+        state:=current_scanner.readid;
+        if (upper(state)='ON') then
           begin
           begin
           end
           end
-        else if (upper(warning_string)='ON') then
-          else
-            begin
-              current_scanner.skipspace;
-              state:=current_scanner.readid;
-            end;
+        else if (upper(state)='OFF') then
+          begin
+          end
+        else
+          Message1(scanner_e_illegal_warn_state,state);
       end;
       end;
 
 
     procedure dir_warning;
     procedure dir_warning;

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů