+ support for "return" without return value in MacPas mode

git-svn-id: trunk@4933 -
This commit is contained in:
Jonas Maebe 2006-10-15 19:22:39 +00:00
parent d72a49fad0
commit 12c76ca1ce
3 changed files with 15 additions and 1 deletions

1
.gitattributes vendored
View File

@ -6003,6 +6003,7 @@ tests/tbs/tb0501.pp svneol=native#text/plain
tests/tbs/tb0502.pp svneol=native#text/plain
tests/tbs/tb0503.pp svneol=native#text/plain
tests/tbs/tb0504.pp svneol=native#text/plain
tests/tbs/tb0505.pp svneol=native#text/plain
tests/tbs/ub0060.pp svneol=native#text/plain
tests/tbs/ub0069.pp svneol=native#text/plain
tests/tbs/ub0119.pp svneol=native#text/plain

View File

@ -2120,7 +2120,10 @@ implementation
_RETURN :
begin
consume(_RETURN);
p1 := cexitnode.create(comp_expr(true));
if not(token in [_SEMICOLON,_ELSE,_END]) then
p1 := cexitnode.create(comp_expr(true))
else
p1 := cexitnode.create(nil);
end;
_INHERITED :
begin

10
tests/tbs/tb0505.pp Normal file
View File

@ -0,0 +1,10 @@
{$mode macpas}
procedure test;
begin
return;
end;
begin
test;
end.