Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Parse/BuildParseTree.pas
Original file line number Diff line number Diff line change
Expand Up @@ -5395,6 +5395,10 @@ procedure TBuildParseTree.RecogniseActualParam;
}
if lc.TokenType = ttArray then
RecogniseArrayType
else if lc.TokenType = ttProcedure then
RecogniseProcedureDecl(true)
else if lc.TokenType = ttFunction then
RecogniseFunctionDecl(true)
else if AnonymousMethodNext then
RecogniseAnonymousMethod
else
Expand Down
7 changes: 7 additions & 0 deletions test.pas
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@ function myFunction(aParam: string
write('Enter your name: '); //? input
readln(s);
writeln('Hello, ', s, '!'); //+ forgotten

// anonymous function/procedure as parameter
var somevar: String := TSomeClass.create(
procedure
begin
var aVar: String;
end);

//-readln; // unnecessary
// TODO: to-do next
Expand Down