Skip to content

Commit a6c284e

Browse files
committed
fx
1 parent 74d39a5 commit a6c284e

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/vlindex/verilog_indexer.cpp

+17
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,9 @@ void verilog_indexer_parsert::rItem()
439439
else if(
440440
token == TOK_FUNCTION || token == TOK_TASK || token == TOK_VIRTUAL ||
441441
token == TOK_EXTERN)
442+
{
442443
rTaskFunction();
444+
}
443445
else if(token == TOK_CONSTRAINT)
444446
rConstraint();
445447
else if(token == TOK_ASSIGN)
@@ -1057,6 +1059,21 @@ void verilog_indexer_parsert::rTaskFunction()
10571059

10581060
auto name = next_token(); // name or new
10591061

1062+
{
1063+
idt id;
1064+
1065+
if(tf_keyword == TOK_FUNCTION)
1066+
id.kind = idt::FUNCTION;
1067+
else
1068+
id.kind = idt::TASK;
1069+
1070+
id.name = name.text;
1071+
id.module = current_module;
1072+
id.file_name = verilog_parser.get_file();
1073+
id.line_number = verilog_parser.get_line_no();
1074+
indexer.add(std::move(id));
1075+
}
1076+
10601077
if(tf_keyword == TOK_FUNCTION)
10611078
skip_until(TOK_ENDFUNCTION);
10621079
else

0 commit comments

Comments
 (0)