2
0
Эх сурвалжийг харах

* give an error for {$calling } (i.e., when a procedure directive is
missing)

git-svn-id: trunk@3193 -

Jonas Maebe 19 жил өмнө
parent
commit
05540cad44

+ 2 - 0
compiler/globals.pas

@@ -1976,6 +1976,8 @@ end;
         hs : string;
       begin
         result:=false;
+        if (hs = '') then
+          exit;
         hs:=upper(s);
         if (hs = 'DEFAULT') then
           begin

+ 5 - 2
compiler/msg/errore.msg

@@ -839,8 +839,11 @@ parser_e_only_publishable_classes_can__be_published=03156_E_Only class which are
 % are compiled in \var{\{\$M+\}} or which are derived from such a class. Normally
 % such a class should be derived from TPersitent
 parser_e_proc_directive_expected=03157_E_Procedure directive expected
-% When declaring a procedure in a const block you used a ; after the
-% procedure declaration after which a procedure directive must follow.
+% This error is triggered when you have a \var{\{\$Calling\}} directive without
+% a calling convention specified.
+% It also happens when declaring a procedure in a const block and you
+% used a ; after a procedure declaration which must be followed by a
+% procedure directive.
 % Correct declarations are:
 % \begin{verbatim}
 % const

+ 1 - 1
compiler/msgidx.inc

@@ -678,7 +678,7 @@ const
   option_info=11024;
   option_help_pages=11025;
 
-  MsgTxtSize = 39829;
+  MsgTxtSize = 39835;
 
   MsgIdxMax : array[1..20] of longint=(
     24,75,219,60,62,47,100,22,135,60,

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 185 - 186
compiler/msgtxt.inc


+ 6 - 1
compiler/scandir.pas

@@ -284,7 +284,12 @@ implementation
         current_scanner.skipspace;
         hs:=current_scanner.readid;
         if not SetAktProcCall(hs,aktdefproccall) then
-          Message1(parser_w_unknown_proc_directive_ignored,hs);
+          begin
+            if (hs <> '') then
+              Message1(parser_w_unknown_proc_directive_ignored,hs)
+            else
+              Message(parser_e_proc_directive_expected);
+          end;
       end;
 
 

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно