sv_parser_parser/instantiations/
interface_instantiation.rs

1use crate::*;
2
3// -----------------------------------------------------------------------------
4
5#[tracable_parser]
6#[packrat_parser]
7pub(crate) fn interface_instantiation(s: Span) -> IResult<Span, InterfaceInstantiation> {
8    let (s, a) = interface_identifier(s)?;
9    let (s, b) = opt(parameter_value_assignment)(s)?;
10    let (s, c) = list(symbol(","), hierarchical_instance)(s)?;
11    let (s, d) = symbol(";")(s)?;
12    Ok((
13        s,
14        InterfaceInstantiation {
15            nodes: (a, b, c, d),
16        },
17    ))
18}