Struct lib_ruby_parser::nodes::ConstPattern [−][src]
#[repr(C)]pub struct ConstPattern {
pub const_: Box<Node>,
pub pattern: Box<Node>,
pub begin_l: Loc,
pub end_l: Loc,
pub expression_l: Loc,
}Expand description
Const pattern used in pattern matching (e.g. in A(1, 2))
Fields
const_: Box<Node>Constant that is used, Const("Foo") for in For(42)
pattern: Box<Node>Inner part of the constant pattern
ArrayPattern(vec![ Int("1") ]) for Foo(1)
begin_l: LocLocation of the open parenthesis
case 1; in Foo(42); end
~end_l: LocLocation of the closing parenthesis
case 1; in Foo(42); end
~expression_l: LocLocation of the full expression
case 1; in Foo(42); end
~~~~~~~Implementations
Returns pattern field
Returns begin_l field
Returns expression_l field
Sets pattern field
Sets begin_l field
Sets expression_l field
Trait Implementations
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for ConstPattern
impl Send for ConstPattern
impl Sync for ConstPattern
impl Unpin for ConstPattern
impl UnwindSafe for ConstPattern
Blanket Implementations
Mutably borrows from an owned value. Read more