codetools: fixed skipping else

git-svn-id: trunk@27515 -
This commit is contained in:
mattias 2010-09-28 19:17:03 +00:00
parent b839e824d2
commit ca800a022a
2 changed files with 3 additions and 2 deletions

View File

@ -1416,11 +1416,11 @@ begin
AddError('then expected, but '+GetAtomOrNothing+' found');
// then statement
ReadRawNextPascalAtom(Src,AtomStart);
RunStatement(not ExprIsTrue);
RunStatement(Skip or not ExprIsTrue);
if CompareIdentifiers(AtomStart,'else')=0 then begin
// else statement
ReadRawNextPascalAtom(Src,AtomStart);
RunStatement(ExprIsTrue);
RunStatement(Skip or ExprIsTrue);
end;
// clean up stack
while FStack.Top>StartTop do FStack.Pop;

View File

@ -68,6 +68,7 @@ begin
end else begin
writeln('Result="',Engine.Variables['Result'],'"');
end;
Engine.Variables.WriteDebugReport('Variables');
except
on E: Exception do begin
writeln(E.Message);