/// Parse a list of selected waveforms. See IEEE 1076-2008 section 10.5.
///
/// ```text
/// selected_waves := { wave "when" {expr}"|"+ }","+
/// ```
Parse a list of selected waveforms.
Parse a list of selected waveforms .
pub fn parse_selected_waves<P: Parser>(p: &mut P) -> ReportedResult<Vec<ast::SelectWave>> {
    separated_nonempty(p, Comma, Semicolon, "waveform", |p| {
        let wave = parse_wave(p)?;
        require(p, Keyword(Kw::When))?;
        let mut choices_span = p.peek(0).span;
        let choices = separated_nonempty(
            p,
            Pipe,
            token_predicate!(Comma, Semicolon),
            "choice",
            parse_expr,
        )?;
        choices_span.expand(p.last_span());
        Ok(ast::SelectWave(wave, Spanned::new(choices, choices_span)))
    })
    .map_err(|e| e.into())
}
pub fn parse_selected_waves < P : Parser > ( p : & mut P ) -> ReportedResult < Vec < ast :: SelectWave > > { separated_nonempty ( p , Comma , Semicolon , " " , | p | { let wave = parse_wave ( p ) ? ; require ( p , Keyword ( Kw :: When ) ) ? ; let mut choices_span = p . peek ( 0 ) . span ; let choices = separated_nonempty ( p , Pipe , token_predicate ! ( Comma Semicolon ) , " " , parse_expr , ) ? ; choices_span . expand ( p . last_span ( ) ) ; Ok ( ast :: SelectWave ( wave , Spanned :: new ( choices , choices_span ) ) ) } ) . map_err ( | e | e . into ( ) ) }
Parse a list of selected waveforms.
Parse a list of selected waveforms .
p
&mut P