Browse Source

* Fix bug introduced by caret handling

git-svn-id: trunk@35391 -
michael 8 years ago
parent
commit
53cccb6981
1 changed files with 5 additions and 3 deletions
  1. 5 3
      packages/fcl-passrc/src/pparser.pp

+ 5 - 3
packages/fcl-passrc/src/pparser.pp

@@ -944,7 +944,7 @@ begin
         NextToken;
         if (Curtoken<>tkString) then
           UnGetToken
-        else
+        else if assigned(Element) then
           Element.HintMessage:=CurTokenString;
         end;
       end;
@@ -2455,8 +2455,10 @@ begin
               end;
             declType:
               begin
-                TypeEl := ParseTypeDecl(Declarations);
-                if Assigned(TypeEl) then        // !!!
+              Scanner.ForceCaret:=True;
+              TypeEl := ParseTypeDecl(Declarations);
+              Scanner.ForceCaret:=True; // It may have been switched off
+              if Assigned(TypeEl) then        // !!!
                 begin
                   Declarations.Declarations.Add(TypeEl);
                   if (TypeEl.ClassType = TPasClassType)