sv-parser/sv-parser-parser/src/instantiations/interface_instantiation.rs
2019-07-26 12:58:28 +09:00

18 lines
497 B
Rust

use crate::*;
// -----------------------------------------------------------------------------
#[parser]
pub(crate) fn interface_instantiation(s: Span) -> IResult<Span, InterfaceInstantiation> {
let (s, a) = interface_identifier(s)?;
let (s, b) = opt(parameter_value_assignment)(s)?;
let (s, c) = list(symbol(","), hierarchical_instance)(s)?;
let (s, d) = symbol(";")(s)?;
Ok((
s,
InterfaceInstantiation {
nodes: (a, b, c, d),
},
))
}