mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-17 11:02:07 +02:00
* allow the "then" part of an if-statement to be terminated by any endtoken,
instead of only by "else" (mantis #25781) git-svn-id: trunk@27696 -
This commit is contained in:
parent
02ce2e6029
commit
270c2d700e
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -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
|
||||
|
@ -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
11
tests/webtbs/tw25781.pp
Normal file
@ -0,0 +1,11 @@
|
||||
{ %norun }
|
||||
|
||||
{$mode delphi}
|
||||
|
||||
begin
|
||||
try
|
||||
if true then
|
||||
except
|
||||
end
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user