#[repr(C)]pub struct CaseMatch {
pub expr: Box<Node>,
pub in_bodies: Vec<Node>,
pub else_body: Option<Box<Node>>,
pub keyword_l: Loc,
pub else_l: Option<Loc>,
pub end_l: Loc,
pub expression_l: Loc,
}Expand description
Represents a case statement used for pattern matching (for regular case see Case node)
Fields§
§expr: Box<Node>Expression given to case, Int("1") for case 1; in 1; end
None for code like
case
in pattern
endin_bodies: Vec<Node>A list of InPattern nodes (each has pattern, guard and body)
else_body: Option<Box<Node>>Body of the else branch, None if there’s no else branch
keyword_l: LocLocation of the case keyword
case 1; in 2; end
~~~~else_l: Option<Loc>Location of the else keyword
case 1; in 2; else; end
~~~~None if there’s no else branch
end_l: LocLocation of the end keyword
case 1; in 2; end
~~~expression_l: LocLocation of the full expression
case 1; in 2; end
~~~~~~~~~~~~~~~~~Trait Implementations§
impl StructuralPartialEq for CaseMatch
Auto Trait Implementations§
impl Freeze for CaseMatch
impl RefUnwindSafe for CaseMatch
impl Send for CaseMatch
impl Sync for CaseMatch
impl Unpin for CaseMatch
impl UnwindSafe for CaseMatch
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