Struct lib_ruby_parser::nodes::InPattern [−][src]
#[repr(C)]pub struct InPattern { pub pattern: Box<Node>, pub guard: Option<Box<Node>>, pub body: Option<Box<Node>>, pub keyword_l: Loc, pub begin_l: Loc, pub expression_l: Loc, }
Expand description
Represents an in pattern
branch of the pattern matching
Fields
pattern: Box<Node>
Value that is used for matching
guard: Option<Box<Node>>
Guard that is used for matching
Optional, so can be None
body: Option<Box<Node>>
Body of the branch that is invoked if value matches pattern
keyword_l: Loc
Location of the in
keyword
case value; in pattern; end
~~
begin_l: Loc
Location of the then
keyword
case value; in pattern then; end
~~~~
expression_l: Loc
Location of the full expression
case value; in pattern then; 42; end
~~~~~~~~~~~~~~~~~~~
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for InPattern
impl UnwindSafe for InPattern
Blanket Implementations
Mutably borrows from an owned value. Read more