mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 00:29:33 +02:00
parent
ca9e2f5e5d
commit
0a9031c76f
@ -4170,7 +4170,7 @@ begin
|
||||
begin
|
||||
NextToken;
|
||||
curblock.AddCommand('goto '+curtokenstring);
|
||||
expecttoken(tkSemiColon);
|
||||
// expecttoken(tkSemiColon);
|
||||
end;
|
||||
tkfor:
|
||||
begin
|
||||
|
@ -110,8 +110,9 @@ Type
|
||||
Procedure TestTryExceptOn2;
|
||||
Procedure TestTryExceptOnElse;
|
||||
Procedure TestTryExceptOnIfElse;
|
||||
procedure TestTryExceptRaise;
|
||||
procedure TestTryExceptRaise;
|
||||
Procedure TestAsm;
|
||||
Procedure TestGotoInIfThen;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -1646,6 +1647,21 @@ begin
|
||||
AssertEquals('token 4 ','1',T.Tokens[3]);
|
||||
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
|
||||
RegisterTests([TTestStatementParser]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user