fpvectorial-eps: Fixes a regression in fttest.eps

git-svn-id: trunk@42116 -
This commit is contained in:
sekelsenmat 2013-07-17 12:17:35 +00:00
parent 72eac91527
commit a134f0af35

View File

@ -44,7 +44,7 @@ type
BoolValue: Boolean; BoolValue: Boolean;
Line: Integer; // To help debugging Line: Integer; // To help debugging
constructor Create; virtual; constructor Create; virtual;
procedure CopyDataFrom(ASrc: TPSToken); virtual; procedure CopyDataFrom(ASrc: TPSToken; AKeepTokenType: Boolean); virtual;
function Duplicate: TPSToken; virtual; function Duplicate: TPSToken; virtual;
end; end;
@ -89,7 +89,7 @@ type
ETType: TETType; ETType: TETType;
function IsExpressionOperand: Boolean; function IsExpressionOperand: Boolean;
procedure PrepareFloatValue; procedure PrepareFloatValue;
procedure CopyDataFrom(ASrc: TPSToken); override; procedure CopyDataFrom(ASrc: TPSToken; AKeepTokenType: Boolean); override;
function Duplicate: TPSToken; override; function Duplicate: TPSToken; override;
end; end;
@ -301,7 +301,7 @@ begin
inherited Create; inherited Create;
end; end;
procedure TPSToken.CopyDataFrom(ASrc: TPSToken); procedure TPSToken.CopyDataFrom(ASrc: TPSToken; AKeepTokenType: Boolean);
begin begin
StrValue := ASrc.StrValue; StrValue := ASrc.StrValue;
FloatValue := ASrc.FloatValue; FloatValue := ASrc.FloatValue;
@ -376,10 +376,11 @@ begin
end; end;
end; end;
procedure TExpressionToken.CopyDataFrom(ASrc: TPSToken); procedure TExpressionToken.CopyDataFrom(ASrc: TPSToken; AKeepTokenType: Boolean);
begin begin
inherited CopyDataFrom(ASrc); inherited CopyDataFrom(ASrc, AKeepTokenType);
if ASrc is TExpressionToken then ETType := TExpressionToken(ASrc).ETType; if (ASrc is TExpressionToken) and (not AKeepTokenType) then
ETType := TExpressionToken(ASrc).ETType;
end; end;
function TExpressionToken.Duplicate: TPSToken; function TExpressionToken.Duplicate: TPSToken;
@ -3028,7 +3029,7 @@ begin
if SubstituteToken is TExpressionToken then if SubstituteToken is TExpressionToken then
begin begin
ACurToken.CopyDataFrom(SubstituteToken); ACurToken.CopyDataFrom(SubstituteToken, True);
end end
else if (SubstituteToken is TProcedureToken) or else if (SubstituteToken is TProcedureToken) or
(SubstituteToken is TArrayToken) then (SubstituteToken is TArrayToken) then