fcl-passrc: fixed result of TPascalScanner.SetForceCaret

git-svn-id: trunk@36720 -
This commit is contained in:
Mattias Gaertner 2017-07-10 17:38:15 +00:00
parent c788256fc9
commit 9cc3bc0a47

View File

@ -610,7 +610,7 @@ type
function RemoveMacro(const aName: String; Quiet: boolean = false): boolean;
Procedure SetCompilerMode(S : String);
function CurSourcePos: TPasSourcePos;
Function SetForceCaret(AValue : Boolean) : Boolean;
Function SetForceCaret(AValue : Boolean) : Boolean; // returns old state
property FileResolver: TBaseFileResolver read FFileResolver;
property CurSourceFile: TLineReader read FCurSourceFile;
property CurFilename: string read FCurFilename;
@ -3700,6 +3700,7 @@ end;
function TPascalScanner.SetForceCaret(AValue: Boolean): Boolean;
begin
Result:=toForceCaret in FTokenOptions;
if aValue then
Include(FTokenOptions,toForceCaret)
else