mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 09:49:35 +02:00
parent
ca9e2f5e5d
commit
0a9031c76f
@ -4170,7 +4170,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
NextToken;
|
NextToken;
|
||||||
curblock.AddCommand('goto '+curtokenstring);
|
curblock.AddCommand('goto '+curtokenstring);
|
||||||
expecttoken(tkSemiColon);
|
// expecttoken(tkSemiColon);
|
||||||
end;
|
end;
|
||||||
tkfor:
|
tkfor:
|
||||||
begin
|
begin
|
||||||
|
@ -112,6 +112,7 @@ Type
|
|||||||
Procedure TestTryExceptOnIfElse;
|
Procedure TestTryExceptOnIfElse;
|
||||||
procedure TestTryExceptRaise;
|
procedure TestTryExceptRaise;
|
||||||
Procedure TestAsm;
|
Procedure TestAsm;
|
||||||
|
Procedure TestGotoInIfThen;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -1646,6 +1647,21 @@ begin
|
|||||||
AssertEquals('token 4 ','1',T.Tokens[3]);
|
AssertEquals('token 4 ','1',T.Tokens[3]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Procedure TTestStatementParser.TestGotoInIfThen;
|
||||||
|
|
||||||
|
begin
|
||||||
|
AddStatements(['if expr then',
|
||||||
|
' dosomething',
|
||||||
|
' else if expr2 then',
|
||||||
|
' goto try_qword',
|
||||||
|
' else',
|
||||||
|
' dosomething;',
|
||||||
|
' try_qword:',
|
||||||
|
' dosomething;',
|
||||||
|
'end.']);
|
||||||
|
ParseModule;
|
||||||
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
RegisterTests([TTestStatementParser]);
|
RegisterTests([TTestStatementParser]);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user