@@ -144,6 +144,7 @@ fn parse_interface_object_declaration(
144144 . into_iter ( )
145145 . map ( |ident| {
146146 InterfaceDeclaration :: Object ( InterfaceObjectDeclaration {
147+ list_type,
147148 mode,
148149 class : object_class,
149150 ident,
@@ -258,13 +259,6 @@ fn parse_semicolon_separator(stream: &mut TokenStream) -> ParseResult<()> {
258259 Ok ( ( ) )
259260}
260261
261- #[ derive( PartialEq , Clone , Copy ) ]
262- enum InterfaceListType {
263- Port ,
264- Generic ,
265- Parameter ,
266- }
267-
268262fn is_sync_kind ( list_type : InterfaceListType , kind : Kind ) -> bool {
269263 matches ! (
270264 ( list_type, kind) ,
@@ -405,13 +399,15 @@ mod tests {
405399 code. with_stream_no_diagnostics( parse_generic_interface_list) ,
406400 vec![
407401 InterfaceDeclaration :: Object ( InterfaceObjectDeclaration {
402+ list_type: InterfaceListType :: Generic ,
408403 mode: Mode :: In ,
409404 class: ObjectClass :: Constant ,
410405 ident: code. s1( "foo" ) . ident( ) ,
411406 subtype_indication: code. s1( "natural" ) . subtype_indication( ) ,
412407 expression: None
413408 } ) ,
414409 InterfaceDeclaration :: Object ( InterfaceObjectDeclaration {
410+ list_type: InterfaceListType :: Generic ,
415411 mode: Mode :: In ,
416412 class: ObjectClass :: Constant ,
417413 ident: code. s1( "bar" ) . ident( ) ,
@@ -428,6 +424,7 @@ mod tests {
428424 assert_eq ! (
429425 code. with_stream( parse_generic) ,
430426 InterfaceDeclaration :: Object ( InterfaceObjectDeclaration {
427+ list_type: InterfaceListType :: Generic ,
431428 mode: Mode :: In ,
432429 class: ObjectClass :: Constant ,
433430 ident: code. s1( "foo" ) . ident( ) ,
@@ -479,6 +476,7 @@ mod tests {
479476 assert_eq ! (
480477 code. with_stream( parse_port) ,
481478 InterfaceDeclaration :: Object ( InterfaceObjectDeclaration {
479+ list_type: InterfaceListType :: Port ,
482480 mode: Mode :: In ,
483481 class: ObjectClass :: Signal ,
484482 ident: code. s1( "foo" ) . ident( ) ,
@@ -546,8 +544,8 @@ mod tests {
546544 assert_eq ! (
547545 code. with_stream( parse_generic) ,
548546 InterfaceDeclaration :: Object ( InterfaceObjectDeclaration {
547+ list_type: InterfaceListType :: Generic ,
549548 mode: Mode :: In ,
550-
551549 class: ObjectClass :: Constant ,
552550 ident: code. s1( "foo" ) . ident( ) ,
553551 subtype_indication: code. s1( "std_logic" ) . subtype_indication( ) ,
@@ -562,8 +560,8 @@ mod tests {
562560 assert_eq ! (
563561 code. with_stream( parse_port) ,
564562 InterfaceDeclaration :: Object ( InterfaceObjectDeclaration {
563+ list_type: InterfaceListType :: Port ,
565564 mode: Mode :: In ,
566-
567565 class: ObjectClass :: Signal ,
568566 ident: code. s1( "foo" ) . ident( ) ,
569567 subtype_indication: code. s1( "std_logic" ) . subtype_indication( ) ,
0 commit comments