pub struct HashPatternNode<'pr> { /* private fields */ }Expand description
Represents a hash pattern in pattern matching.
foo => { a: 1, b: 2 }
^^^^^^^^^^^^^^foo => { a: 1, b: 2, **c }
^^^^^^^^^^^^^^^^^^^foo => Bar[a: 1, b: 2]
^^^^^^^^^^^^^^^foo in { a: 1, b: 2 }
^^^^^^^^^^^^^^Implementations§
Source§impl<'pr> HashPatternNode<'pr>
impl<'pr> HashPatternNode<'pr>
Sourcepub fn flags(&self) -> pm_node_flags_t
pub fn flags(&self) -> pm_node_flags_t
Returns the flags of this node.
Sourcepub fn opening_loc(&self) -> Option<Location<'pr>>
pub fn opening_loc(&self) -> Option<Location<'pr>>
Returns the opening_loc param
Sourcepub fn closing_loc(&self) -> Option<Location<'pr>>
pub fn closing_loc(&self) -> Option<Location<'pr>>
Returns the closing_loc param