* allow the "then" part of an if-statement to be terminated by any endtoken,

instead of only by "else" (mantis )

git-svn-id: trunk@27696 -
This commit is contained in:
Jonas Maebe 2014-04-30 19:25:06 +00:00
parent 02ce2e6029
commit 270c2d700e
3 changed files with 13 additions and 1 deletions

1
.gitattributes vendored
View File

@ -13907,6 +13907,7 @@ tests/webtbs/tw25605.pp svneol=native#text/pascal
tests/webtbs/tw2561.pp svneol=native#text/plain
tests/webtbs/tw25610.pp -text svneol=native#text/plain
tests/webtbs/tw25685.pp svneol=native#text/pascal
tests/webtbs/tw25781.pp svneol=native#text/plain
tests/webtbs/tw25814.pp svneol=native#text/plain
tests/webtbs/tw25869.pp svneol=native#text/plain
tests/webtbs/tw2588.pp svneol=native#text/plain

View File

@ -73,7 +73,7 @@ implementation
consume(_IF);
ex:=comp_expr(true,false);
consume(_THEN);
if token<>_ELSE then
if not(token in endtokens) then
if_a:=statement
else
if_a:=nil;

11
tests/webtbs/tw25781.pp Normal file
View File

@ -0,0 +1,11 @@
{ %norun }
{$mode delphi}
begin
try
if true then
except
end
end.