fcl-passrc: case statement: consistent calling AddExpression

git-svn-id: trunk@43872 -
This commit is contained in:
Mattias Gaertner 2020-01-06 16:53:01 +00:00
parent 6612bb4434
commit 1ffc5f49aa
2 changed files with 5 additions and 4 deletions

View File

@ -1557,6 +1557,7 @@ type
end;
{ TPasImplAssign }
TAssignKind = (akDefault,akAdd,akMinus,akMul,akDivision);
TPasImplAssign = class (TPasImplStatement)
public
@ -1594,8 +1595,8 @@ type
procedure ForEachCall(const aMethodCall: TOnForEachPasElement;
const Arg: Pointer); override;
public
FinallyExcept: TPasImplTryHandler;
ElseBranch: TPasImplTryExceptElse;
FinallyExcept: TPasImplTryHandler; // not in Elements
ElseBranch: TPasImplTryExceptElse; // not in Elements
end;
TPasImplTryHandler = class(TPasImplBlock)

View File

@ -5924,9 +5924,9 @@ begin
CloseBlock;
CloseStatement(false);
end;
// Case ... else without semicolon in front.
end else if (CurBlock is TPasImplCaseStatement) then
begin
// Case ... else without semicolon in front.
UngetToken;
CloseStatement(False);
break;
@ -6118,7 +6118,7 @@ begin
//writeln(i,'CASE value="',Expr,'" Token=',CurTokenText);
if CurBlock is TPasImplCaseStatement then
begin
TPasImplCaseStatement(CurBlock).Expressions.Add(Left);
TPasImplCaseStatement(CurBlock).AddExpression(Left);
Left:=nil;
end
else