Skip to content

Commit 2289640

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 2289640

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/verilog/parser.y

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3218,9 +3218,11 @@ 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);
3225+
mto($$, $2);
32243226
mto($$, $4); }
32253227
;
32263228

0 commit comments

Comments
 (0)