pub fn parse_cond_waves<P: Parser>(p: &mut P) -> ReportedResult<Vec<ast::CondWave>> {
    separated_nonempty(p, Keyword(Kw::Else), Semicolon, "waveform", |p| {
        let wave = parse_wave(p)?;
        let cond = if accept(p, Keyword(Kw::When)) {
            Some(parse_expr(p)?)
        } else {
            None
        };
        Ok(ast::CondWave(wave, cond))
    })
    .map_err(|e| e.into())
}
/// Parse a list of conditional waveforms. See IEEE 1076-2008 section 10.5.
///
/// ```text
/// cond_waves := { wave ["when" expr] }"else"+
/// ```
Parse a list of conditional waveforms.
Parse a list of conditional waveforms .
pub fn parse_cond_waves<P: Parser>(p: &mut P) -> ReportedResult<Vec<ast::CondWave>> {
    separated_nonempty(p, Keyword(Kw::Else), Semicolon, "waveform", |p| {
        let wave = parse_wave(p)?;
        let cond = if accept(p, Keyword(Kw::When)) {
            Some(parse_expr(p)?)
        } else {
            None
        };
        Ok(ast::CondWave(wave, cond))
    })
    .map_err(|e| e.into())
}
pub fn parse_cond_waves < P : Parser > ( p : & mut P ) -> ReportedResult < Vec < ast :: CondWave > > { separated_nonempty ( p , Keyword ( Kw :: Else ) , Semicolon , " " , | p | { let wave = parse_wave ( p ) ? ; let cond = if accept ( p , Keyword ( Kw :: When ) ) { Some ( parse_expr ( p ) ? ) } else { None } ; Ok ( ast :: CondWave ( wave , cond ) ) } ) . map_err ( | e | e . into ( ) ) }
Parse a list of conditional waveforms.
Parse a list of conditional waveforms .
p
&mut P
p
&mut P