StmtKind

Enum StmtKind 

Source
pub enum StmtKind<'a> {
Show 26 variants NullStmt, SequentialBlock(Vec<Stmt<'a>>), ParallelBlock(Vec<Stmt<'a>>, JoinKind), IfStmt { up: Option<UniquePriority>, cond: Expr<'a>, main_stmt: Box<Stmt<'a>>, else_stmt: Option<Box<Stmt<'a>>>, }, BlockingAssignStmt { lhs: Expr<'a>, rhs: Expr<'a>, op: AssignOp, }, NonblockingAssignStmt { lhs: Expr<'a>, rhs: Expr<'a>, delay: Option<DelayControl<'a>>, event: Option<()>, }, TimedStmt(TimingControl<'a>, Box<Stmt<'a>>), CaseStmt { up: Option<UniquePriority>, kind: CaseKind, expr: Expr<'a>, mode: CaseMode, items: Vec<CaseItem<'a>>, }, ForeverStmt(Box<Stmt<'a>>), RepeatStmt(Expr<'a>, Box<Stmt<'a>>), WhileStmt(Expr<'a>, Box<Stmt<'a>>), DoStmt(Box<Stmt<'a>>, Expr<'a>), ForStmt(Box<Stmt<'a>>, Expr<'a>, Expr<'a>, Box<Stmt<'a>>), ForeachStmt(Expr<'a>, Vec<ForeachIndex<'a>>, Box<Stmt<'a>>), ExprStmt(Expr<'a>), VarDeclStmt(VarDecl<'a>), GenvarDeclStmt(Vec<GenvarDecl<'a>>), ContinueStmt, BreakStmt, ReturnStmt(Option<Expr<'a>>), ImportStmt(ImportDecl<'a>), AssertionStmt(Box<Assertion<'a>>), WaitExprStmt(Expr<'a>, Box<Stmt<'a>>), WaitForkStmt, DisableForkStmt, DisableStmt(Name),
}
Expand description

The different kinds of statement.

Variants§

§

NullStmt

§

SequentialBlock(Vec<Stmt<'a>>)

§

ParallelBlock(Vec<Stmt<'a>>, JoinKind)

§

IfStmt

Fields

§cond: Expr<'a>
§main_stmt: Box<Stmt<'a>>
§else_stmt: Option<Box<Stmt<'a>>>
§

BlockingAssignStmt

Fields

§lhs: Expr<'a>
§rhs: Expr<'a>
§

NonblockingAssignStmt

Fields

§lhs: Expr<'a>
§rhs: Expr<'a>
§event: Option<()>
§

TimedStmt(TimingControl<'a>, Box<Stmt<'a>>)

§

CaseStmt

Fields

§expr: Expr<'a>
§items: Vec<CaseItem<'a>>
§

ForeverStmt(Box<Stmt<'a>>)

§

RepeatStmt(Expr<'a>, Box<Stmt<'a>>)

§

WhileStmt(Expr<'a>, Box<Stmt<'a>>)

§

DoStmt(Box<Stmt<'a>>, Expr<'a>)

§

ForStmt(Box<Stmt<'a>>, Expr<'a>, Expr<'a>, Box<Stmt<'a>>)

§

ForeachStmt(Expr<'a>, Vec<ForeachIndex<'a>>, Box<Stmt<'a>>)

§

ExprStmt(Expr<'a>)

§

VarDeclStmt(VarDecl<'a>)

§

GenvarDeclStmt(Vec<GenvarDecl<'a>>)

§

ContinueStmt

§

BreakStmt

§

ReturnStmt(Option<Expr<'a>>)

§

ImportStmt(ImportDecl<'a>)

§

AssertionStmt(Box<Assertion<'a>>)

§

WaitExprStmt(Expr<'a>, Box<Stmt<'a>>)

§

WaitForkStmt

§

DisableForkStmt

§

DisableStmt(Name)

Trait Implementations§

Source§

impl<'a> AcceptVisitor<'a> for StmtKind<'a>

Source§

fn accept(&'a self, visitor: &mut dyn Visitor<'a>)

Walk a visitor over the contents of self.
Source§

impl<'a> Clone for StmtKind<'a>

Source§

fn clone(&self) -> StmtKind<'a>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for StmtKind<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> ForEachChild<'a> for StmtKind<'a>

Source§

fn for_each_child(&'a self, each: &mut dyn FnMut(&'a dyn AnyNode<'a>))

Apply a function to each child node.
Source§

impl<'a> ForEachNode<'a> for StmtKind<'a>

Source§

fn for_each_node(&'a self, each: &mut dyn FnMut(&'a dyn AnyNode<'a>))

Apply a function to this node.
Source§

impl<'a> PartialEq for StmtKind<'a>

Source§

fn eq(&self, other: &StmtKind<'a>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a> WalkVisitor<'a> for StmtKind<'a>

Source§

fn walk(&'a self, visitor: &mut dyn Visitor<'a>)

Walk a visitor over self.

Calling this function is equivalent to calling:

  • visitor.pre_visit_stmt_kind(self)
  • self.accept(visitor)
  • visitor.post_visit_stmt_kind(self);
Source§

impl<'a> Eq for StmtKind<'a>

Source§

impl<'a> StructuralPartialEq for StmtKind<'a>

Auto Trait Implementations§

§

impl<'a> !Freeze for StmtKind<'a>

§

impl<'a> !RefUnwindSafe for StmtKind<'a>

§

impl<'a> Send for StmtKind<'a>

§

impl<'a> Sync for StmtKind<'a>

§

impl<'a> Unpin for StmtKind<'a>

§

impl<'a> !UnwindSafe for StmtKind<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.