FpDebug: Pascalparser, keep symbol for repeated eval

This commit is contained in:
Martin 2024-10-12 20:51:21 +02:00
parent 678b9aa2dc
commit df69b2230f

View File

@ -335,6 +335,7 @@ type
function DoGetResultValue: TFpValue; override;
property OnGetSymbol: TFpPascalParserGetSymbolForIdentProc read FOnGetSymbol write FOnGetSymbol;
procedure Assign(ASourcePart: TFpPascalExpressionPart); override;
procedure ResetEvaluation; override;
end;
{ TFpPascalExpressionPartCpuRegister }
@ -2747,6 +2748,14 @@ begin
end;
end;
procedure TFpPascalExpressionPartIdentifier.ResetEvaluation;
begin
if (FResultValue <> nil) and (FOnGetSymbol = nil) then
FResultValue.Reset
else
inherited ResetEvaluation;
end;
function GetFirstToken(AText: PChar): String;
begin
Result := AText[0];