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

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,
    },
}
Expand description

The different forms a statement can take.

Variants

Null

A null statement.

Block(Vec<NodeId>)

A sequential block.

Tuple Fields of Block

0: Vec<NodeId>
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.

Tuple Fields of Expr

0: NodeId
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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.