Struct koto_parser::AstIf
source · pub struct AstIf {
pub condition: AstIndex,
pub then_node: AstIndex,
pub else_if_blocks: Vec<(AstIndex, AstIndex)>,
pub else_node: Option<AstIndex>,
}
Expand description
An if expression definition
Fields§
§condition: AstIndex
The if expression’s condition
then_node: AstIndex
The if expression’s then
branch
else_if_blocks: Vec<(AstIndex, AstIndex)>
An optional series of else if
conditions and branches
else_node: Option<AstIndex>
An optional else
branch
Trait Implementations§
source§impl PartialEq for AstIf
impl PartialEq for AstIf
impl Eq for AstIf
impl StructuralPartialEq for AstIf
Auto Trait Implementations§
impl Freeze for AstIf
impl RefUnwindSafe for AstIf
impl Send for AstIf
impl Sync for AstIf
impl Unpin for AstIf
impl UnwindSafe for AstIf
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