Skip to content

Commit 4125b66

Browse files
committed
SystemVerilog: allow typedefs as port names in named port connections
This allows the use of identifiers that are typedefs in the local scope as the name of the port in a named port connection.
1 parent 6450994 commit 4125b66

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/verilog/parser.y

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3218,10 +3218,12 @@ named_port_connection_brace:
32183218
;
32193219

32203220
named_port_connection:
3221-
'.' port_identifier '(' expression_opt ')'
3221+
// This needs to be 'any_identifier' to allow identifiers that
3222+
// are typedefs in the local scope.
3223+
'.' any_identifier '(' expression_opt ')'
32223224
{ init($$, ID_named_port_connection);
3223-
mto($$, $2);
3224-
mto($$, $4); }
3225+
mto($$, $2);
3226+
mto($$, $4); }
32253227
;
32263228

32273229
// System Verilog standard 1800-2017

0 commit comments

Comments
 (0)