Skip to content

Commit 3024e8b

Browse files
authored
Merge pull request #3215 from masatake/revise-ntrel-pas-type-partial
Pascal: fix looking for an identifier when there's a comment
2 parents c5cb48d + 781ef2d commit 3024e8b

File tree

5 files changed

+13
-0
lines changed

5 files changed

+13
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fun1 input.pas /^function {} Fun1: integer;$/;" f typeref:typename:integer
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
program hello;
2+
3+
function {} Fun1: integer;
4+
begin
5+
Fun1 := 1;
6+
end;
7+
8+
begin
9+
Fun1();
10+
end.

parsers/pascal.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,8 @@ static void findPascalTags (void)
274274
/* grab block name */
275275
while (isspace ((int) *dbp))
276276
++dbp;
277+
if (!starttoken(*dbp))
278+
continue;
277279
for (cp = dbp ; *cp != '\0' && !endtoken (*cp) ; cp++)
278280
continue;
279281
vStringNCopyS (name, (const char*) dbp, cp - dbp);

0 commit comments

Comments
 (0)