pub enum Statement {
IfThenElse {
meta: Meta,
cond: Expression,
if_case: Box<Statement>,
else_case: Option<Box<Statement>>,
},
While {
meta: Meta,
cond: Expression,
stmt: Box<Statement>,
},
Return {
meta: Meta,
value: Expression,
},
InitializationBlock {
meta: Meta,
xtype: VariableType,
initializations: Vec<Statement>,
},
Declaration {
meta: Meta,
xtype: VariableType,
name: String,
dimensions: Vec<Expression>,
is_constant: bool,
},
Substitution {
meta: Meta,
var: String,
access: Vec<Access>,
op: AssignOp,
rhe: Expression,
},
MultSubstitution {
meta: Meta,
lhe: Expression,
op: AssignOp,
rhe: Expression,
},
UnderscoreSubstitution {
meta: Meta,
op: AssignOp,
rhe: Expression,
},
ConstraintEquality {
meta: Meta,
lhe: Expression,
rhe: Expression,
},
LogCall {
meta: Meta,
args: Vec<LogArgument>,
},
Block {
meta: Meta,
stmts: Vec<Statement>,
},
Assert {
meta: Meta,
arg: Expression,
},
}
Variants§
IfThenElse
While
Return
InitializationBlock
Declaration
Substitution
MultSubstitution
UnderscoreSubstitution
ConstraintEquality
LogCall
Block
Assert
Implementations§
Source§impl Statement
impl Statement
pub fn get_meta(&self) -> &Meta
pub fn get_mut_meta(&mut self) -> &mut Meta
pub fn is_if_then_else(&self) -> bool
pub fn is_while(&self) -> bool
pub fn is_return(&self) -> bool
pub fn is_initialization_block(&self) -> bool
pub fn is_declaration(&self) -> bool
pub fn is_substitution(&self) -> bool
pub fn is_underscore_substitution(&self) -> bool
pub fn is_constraint_equality(&self) -> bool
pub fn is_log_call(&self) -> bool
pub fn is_block(&self) -> bool
pub fn is_assert(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Statement
impl RefUnwindSafe for Statement
impl Send for Statement
impl Sync for Statement
impl Unpin for Statement
impl UnwindSafe for Statement
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more