Browse Source

* fixed comment level counting after directive

peter 26 years ago
parent
commit
c60316b0d3
1 changed files with 11 additions and 2 deletions
  1. 11 2
      compiler/scanner.pas

+ 11 - 2
compiler/scanner.pas

@@ -727,12 +727,18 @@ implementation
         i:=0;
         i:=0;
         repeat
         repeat
           case c of
           case c of
+           '{' :
+             if aktcommentstyle=comment_tp then
+              inc_comment_level;
            '}' :
            '}' :
              if aktcommentstyle=comment_tp then
              if aktcommentstyle=comment_tp then
               begin
               begin
                 readchar;
                 readchar;
                 dec_comment_level;
                 dec_comment_level;
-                break;
+                if comment_level=0 then
+                 break
+                else
+                 continue;
               end;
               end;
            '*' :
            '*' :
              if aktcommentstyle=comment_oldtp then
              if aktcommentstyle=comment_oldtp then
@@ -1689,7 +1695,10 @@ exit_label:
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.98  1999-11-02 15:05:08  peter
+  Revision 1.99  1999-11-03 23:44:28  peter
+    * fixed comment level counting after directive
+
+  Revision 1.98  1999/11/02 15:05:08  peter
     * fixed oldtp comment parsing
     * fixed oldtp comment parsing
 
 
   Revision 1.97  1999/10/30 12:32:30  peter
   Revision 1.97  1999/10/30 12:32:30  peter