mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 16:21:01 +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');
|
AddError('then expected, but '+GetAtomOrNothing+' found');
|
||||||
// then statement
|
// then statement
|
||||||
ReadRawNextPascalAtom(Src,AtomStart);
|
ReadRawNextPascalAtom(Src,AtomStart);
|
||||||
RunStatement(not ExprIsTrue);
|
RunStatement(Skip or not ExprIsTrue);
|
||||||
if CompareIdentifiers(AtomStart,'else')=0 then begin
|
if CompareIdentifiers(AtomStart,'else')=0 then begin
|
||||||
// else statement
|
// else statement
|
||||||
ReadRawNextPascalAtom(Src,AtomStart);
|
ReadRawNextPascalAtom(Src,AtomStart);
|
||||||
RunStatement(ExprIsTrue);
|
RunStatement(Skip or ExprIsTrue);
|
||||||
end;
|
end;
|
||||||
// clean up stack
|
// clean up stack
|
||||||
while FStack.Top>StartTop do FStack.Pop;
|
while FStack.Top>StartTop do FStack.Pop;
|
||||||
|
@ -68,6 +68,7 @@ begin
|
|||||||
end else begin
|
end else begin
|
||||||
writeln('Result="',Engine.Variables['Result'],'"');
|
writeln('Result="',Engine.Variables['Result'],'"');
|
||||||
end;
|
end;
|
||||||
|
Engine.Variables.WriteDebugReport('Variables');
|
||||||
except
|
except
|
||||||
on E: Exception do begin
|
on E: Exception do begin
|
||||||
writeln(E.Message);
|
writeln(E.Message);
|
||||||
|
Loading…
Reference in New Issue
Block a user