* Fix bug ID #31524

git-svn-id: trunk@35593 -
This commit is contained in:
michael 2017-03-15 15:01:45 +00:00
parent ca9e2f5e5d
commit 0a9031c76f
2 changed files with 18 additions and 2 deletions

View File

@ -4170,7 +4170,7 @@ begin
begin
NextToken;
curblock.AddCommand('goto '+curtokenstring);
expecttoken(tkSemiColon);
// expecttoken(tkSemiColon);
end;
tkfor:
begin

View File

@ -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]);