[][src]Enum moore_svlog::hir::StmtKind

pub enum StmtKind {
    Null,
    Block(Vec<NodeId>),
    Assign {
        lhs: NodeId,
        rhs: NodeId,
        kind: AssignKind,
    },
    Timed {
        control: TimingControl,
        stmt: NodeId,
    },
    Expr(NodeId),
    If {
        cond: NodeId,
        main_stmt: NodeId,
        else_stmt: Option<NodeId>,
    },
    Loop {
        kind: LoopKind,
        body: NodeId,
    },
    InlineGroup {
        stmts: Vec<NodeId>,
        rib: NodeId,
    },
    Case {
        expr: NodeId,
        ways: Vec<(Vec<NodeId>, NodeId)>,
        default: Option<NodeId>,
        kind: CaseKind,
    },
}

The different forms a statement can take.

Variants

Null

A null statement.

Block(Vec<NodeId>)

A sequential block.

Assign

An assign statement (blocking or non-blocking).

Fields of Assign

lhs: NodeIdrhs: NodeIdkind: AssignKind
Timed

A statement with timing control.

Fields of Timed

control: TimingControlstmt: NodeId
Expr(NodeId)

An expression statement.

If

An if statement.

if (<cond>) <main_stmt> [else <else_stmt>]

Fields of If

cond: NodeIdmain_stmt: NodeIdelse_stmt: Option<NodeId>
Loop

A loop statement.

Fields of Loop

kind: LoopKindbody: NodeId
InlineGroup

An inline group of statements.

This is a special node that is used for example with variable declarations, where one statement can generate multiple nodes referrable by name. An inline group differs from a block in that its ribs are made visible, whereas a block keeps them local.

Fields of InlineGroup

stmts: Vec<NodeId>rib: NodeId
Case

A case statement.

Fields of Case

expr: NodeIdways: Vec<(Vec<NodeId>, NodeId)>default: Option<NodeId>kind: CaseKind

Trait Implementations

impl Clone for StmtKind[src]

impl Debug for StmtKind[src]

impl Eq for StmtKind[src]

impl PartialEq<StmtKind> for StmtKind[src]

impl StructuralEq for StmtKind[src]

impl StructuralPartialEq for StmtKind[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.