File tree 1 file changed +17
-0
lines changed
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -439,7 +439,9 @@ void verilog_indexer_parsert::rItem()
439
439
else if (
440
440
token == TOK_FUNCTION || token == TOK_TASK || token == TOK_VIRTUAL ||
441
441
token == TOK_EXTERN)
442
+ {
442
443
rTaskFunction ();
444
+ }
443
445
else if (token == TOK_CONSTRAINT)
444
446
rConstraint ();
445
447
else if (token == TOK_ASSIGN)
@@ -1057,6 +1059,21 @@ void verilog_indexer_parsert::rTaskFunction()
1057
1059
1058
1060
auto name = next_token (); // name or new
1059
1061
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
+
1060
1077
if (tf_keyword == TOK_FUNCTION)
1061
1078
skip_until (TOK_ENDFUNCTION);
1062
1079
else
You can’t perform that action at this time.
0 commit comments