Struct liva_parser::statement::declaration::if_statement::If [−][src]
pub struct If<'a> {
pub cond: Expression<'a>,
pub stmts: Block<'a>,
pub else_statements: Option<Block<'a>>,
}
Expand description
Struct to represent a If-Block
Fields
cond: Expression<'a>
Expression which will be evaluated. If it yields a truthy value, the If code block with be executed
stmts: Block<'a>
Code block to execute
else_statements: Option<Block<'a>>
Code block to execute if condition returns a falsy value. This is optional
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for If<'a>
impl<'a> UnwindSafe for If<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more