codetools: parsing else else, bug #23497

git-svn-id: trunk@39669 -
This commit is contained in:
mattias 2012-12-27 23:36:39 +00:00
parent e2d0c4d4f6
commit 15f0c7aa65

View File

@ -2816,8 +2816,16 @@ begin
end else
RaiseStrExpectedWithBlockStartHint('"if"');
end else if UpAtomIs('ELSE') then begin
if (BlockType=ebtIf) and (IfType=itThen) then begin
IfType:=itElse;
if (BlockType=ebtIf) then begin
if (IfType=itThen) then
IfType:=itElse
else if IfType=itElse then begin
// e.g. if then if then else |else ;
CloseNode;
UndoReadNextAtom;
break;
end else
RaiseStrExpectedWithBlockStartHint('"then"');
end else if BlockType=ebtCase then begin
end else
RaiseStrExpectedWithBlockStartHint('"if"');