pub fn parse_assign_tail<P: Parser>(
    p: &mut P,
    target: Spanned<ast::AssignTarget>,
) -> ReportedResult<ast::StmtData> {
    let (kind, guarded) = parse_assign_dst_tail(p)?;
    let (mode, mode_span) = match p.peek(0).value {
        Keyword(Kw::Release) => {
            let mut span = p.peek(0).span;
            p.bump();
            let fm = try_force_mode(p);
            span.expand(p.last_span());
            (ast::AssignMode::Release(fm), span)
        }

        Keyword(Kw::Force) => {
            let mut span = p.peek(0).span;
            p.bump();
            let fm = try_force_mode(p);
            let waves = parse_cond_waves(p)?;
            span.expand(p.last_span());
            (ast::AssignMode::Force(fm, waves), span)
        }

        _ => {
            let mut span = p.peek(0).span;
            let dm = try_delay_mech(p)?;
            let waves = parse_cond_waves(p)?;
            span.expand(p.last_span());
            (ast::AssignMode::Normal(dm, waves), span)
        }
    };
    require(p, Semicolon)?;
    Ok(ast::AssignStmt {
        target: target,
        kind: kind,
        guarded: guarded,
        mode: Spanned::new(mode, mode_span),
    })
}
/// Parse the tail of an assign statement. This function assumes that the name
/// of the signal to be assigned has already been parsed. See IEEE 1076-2008
/// section 10.5.
///
/// ```text
/// assign_stmt
///   := assign_dst "release" [force_mode] ";"
///   := assign_dst assign_mode cond_waves ";"
/// assign_dst := (name|paren_expr) . ("<=" | ":=") ["guarded"]
/// assign_mode := [delay_mech] | "force" [force_mode]
///
/// force_mode := "in" | "out"
/// delay_mech := "transport" | ["reject" expr] "inertial"
/// ```
Parse the tail of an assign statement. This function assumes that the name
of the signal to be assigned has already been parsed.




Parse the tail of an assign statement . This function assumes that the name of the signal to be assigned has already been parsed .
pub fn parse_assign_tail<P: Parser>(
    p: &mut P,
    target: Spanned<ast::AssignTarget>,
) -> ReportedResult<ast::StmtData> {
    let (kind, guarded) = parse_assign_dst_tail(p)?;
    let (mode, mode_span) = match p.peek(0).value {
        Keyword(Kw::Release) => {
            let mut span = p.peek(0).span;
            p.bump();
            let fm = try_force_mode(p);
            span.expand(p.last_span());
            (ast::AssignMode::Release(fm), span)
        }
        Keyword(Kw::Force) => {
            let mut span = p.peek(0).span;
            p.bump();
            let fm = try_force_mode(p);
            let waves = parse_cond_waves(p)?;
            span.expand(p.last_span());
            (ast::AssignMode::Force(fm, waves), span)
        }
        _ => {
            let mut span = p.peek(0).span;
            let dm = try_delay_mech(p)?;
            let waves = parse_cond_waves(p)?;
            span.expand(p.last_span());
            (ast::AssignMode::Normal(dm, waves), span)
        }
    };
    require(p, Semicolon)?;
    Ok(ast::AssignStmt {
        target: target,
        kind: kind,
        guarded: guarded,
        mode: Spanned::new(mode, mode_span),
    })
}
pub fn parse_assign_tail < P : Parser > ( p : & mut P , target : Spanned < ast :: AssignTarget > , ) -> ReportedResult < ast :: StmtData > { let ( kind , guarded ) = parse_assign_dst_tail ( p ) ? ; let ( mode , mode_span ) = match p . peek ( 0 ) . value { Keyword ( Kw :: Release ) => { let mut span = p . peek ( 0 ) . span ; p . bump ( ) ; let fm = try_force_mode ( p ) ; span . expand ( p . last_span ( ) ) ; ( ast :: AssignMode :: Release ( fm ) , span ) } Keyword ( Kw :: Force ) => { let mut span = p . peek ( 0 ) . span ; p . bump ( ) ; let fm = try_force_mode ( p ) ; let waves = parse_cond_waves ( p ) ? ; span . expand ( p . last_span ( ) ) ; ( ast :: AssignMode :: Force ( fm , waves ) , span ) } _ => { let mut span = p . peek ( 0 ) . span ; let dm = try_delay_mech ( p ) ? ; let waves = parse_cond_waves ( p ) ? ; span . expand ( p . last_span ( ) ) ; ( ast :: AssignMode :: Normal ( dm , waves ) , span ) } } ; require ( p , Semicolon ) ? ; Ok ( ast :: AssignStmt { target : target , kind : kind , guarded : guarded , mode : Spanned :: new ( mode , mode_span ) , } ) }
Parse the tail of an assign statement.
Parse the tail of an assign statement .
p
&mut P
target
Spanned<ast::AssignTarget>
p
&mut P
target
Spanned<ast::AssignTarget>