Browse Source

* fix bug #1634 (merged)

peter 24 years ago
parent
commit
5beb1658ce
1 changed files with 14 additions and 4 deletions
  1. 14 4
      compiler/scanner.pas

+ 14 - 4
compiler/scanner.pas

@@ -1783,8 +1783,11 @@ implementation
       begin
       begin
         aktcommentstyle:=comment_oldtp;
         aktcommentstyle:=comment_oldtp;
         inc_comment_level;
         inc_comment_level;
-        readchar;
-      { this is currently not supported }
+        { only load a char if last already processed,
+          was cause of bug1634 PM }
+        if c=#0 then
+          readchar;
+      { this is now supported }
         if (c='$') then
         if (c='$') then
          handledirectives;
          handledirectives;
       { skip comment }
       { skip comment }
@@ -2072,6 +2075,7 @@ implementation
                  case c of
                  case c of
                    '*' :
                    '*' :
                      begin
                      begin
+                       c:=#0;{Signal skipoldtpcomment to reload a char }
                        skipoldtpcomment;
                        skipoldtpcomment;
                        readtoken;
                        readtoken;
                        exit;
                        exit;
@@ -2531,7 +2535,10 @@ exit_label:
                begin
                begin
                   readchar;
                   readchar;
                   if c='*' then
                   if c='*' then
-                   skipoldtpcomment
+                   begin
+                     c:=#0;{Signal skipoldtpcomment to reload a char }
+                     skipoldtpcomment;
+                   end
                   else
                   else
                    begin
                    begin
                      asmgetchar:='(';
                      asmgetchar:='(';
@@ -2598,7 +2605,10 @@ exit_label:
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.23  2001-09-30 21:23:59  peter
+  Revision 1.24  2001-10-12 16:02:34  peter
+    * fix bug 1634 (merged)
+
+  Revision 1.23  2001/09/30 21:23:59  peter
     * merged delphi comment fix
     * merged delphi comment fix
 
 
   Revision 1.22  2001/09/18 11:30:48  michael
   Revision 1.22  2001/09/18 11:30:48  michael