mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 14:36:09 +02:00
codetools: fixed skipping else
git-svn-id: trunk@27515 -
This commit is contained in:
parent
b839e824d2
commit
ca800a022a
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user