Skip to content

Commit

Permalink
Pascal: fix looking for an identifier when there's a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ntrel authored and masatake committed Dec 2, 2021
1 parent 5db3b42 commit 37b2ed7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fun1 input.pas /^function {} Fun1: integer;$/;" f typeref:typename:integer
10 changes: 10 additions & 0 deletions Units/parser-pascal.r/comment-after-keyword.d/input.pas
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
program hello;

function {} Fun1: integer;
begin
Fun1 := 1;
end;

begin
Fun1();
end.
2 changes: 2 additions & 0 deletions parsers/pascal.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,8 @@ static void findPascalTags (void)
/* grab block name */
while (isspace ((int) *dbp))
++dbp;
if (!starttoken(*dbp))
continue;
for (cp = dbp ; *cp != '\0' && !endtoken (*cp) ; cp++)
continue;
vStringNCopyS (name, (const char*) dbp, cp - dbp);
Expand Down

0 comments on commit 37b2ed7

Please sign in to comment.