struct
IfBlock
pub struct IfBlock {
pub cond: Path,
pub negated: bool,
pub compare: Option<(CmpOp, Value)>,
pub then_branch: Vec<Node>,
pub else_branch: Vec<Node>,
pub expr: Option<Expr>,
}if [!]cond { … } else { … }
Fields
cond
pub cond: PathThe condition, when it's a path (if busy, if !busy, if n > 3); otherwise expr holds it and this is _.
compare
pub compare: Option<(CmpOp, Value)>if cond <op> value — compares the condition's value instead of testing its truthiness.
else_branch
pub else_branch: Vec<Node>Nodes shown when it doesn't (else, and else if as a nested if).