pub type pm_array_pattern_node_t = pm_array_pattern_node;Expand description
ArrayPatternNode
Represents an array pattern in pattern matching.
foo in 1, 2
^^^^^^^^^^^ foo in [1, 2]
^^^^^^^^^^^^^ foo in *bar
^^^^^^^^^^^ foo in Bar[]
^^^^^^^^^^^^ foo in Bar[1, 2, 3]
^^^^^^^^^^^^^^^^^^^Type: ::PM_ARRAY_PATTERN_NODE
@extends pm_node_t
Aliased Type§
#[repr(C)]pub struct pm_array_pattern_node_t {
pub base: pm_node,
pub constant: *mut pm_node,
pub requireds: pm_node_list,
pub rest: *mut pm_node,
pub posts: pm_node_list,
pub opening_loc: pm_location_t,
pub closing_loc: pm_location_t,
}Fields§
§base: pm_nodeThe embedded base node.
constant: *mut pm_nodeArrayPatternNode#constant
Represents the optional constant preceding the Array
foo in Bar[]
^^^ foo in Bar[1, 2, 3]
^^^ foo in Bar::Baz[1, 2, 3]
^^^^^^^^requireds: pm_node_listArrayPatternNode#requireds
Represents the required elements of the array pattern.
foo in [1, 2]
^ ^rest: *mut pm_nodeArrayPatternNode#rest
Represents the rest element of the array pattern.
foo in *bar
^^^^posts: pm_node_listArrayPatternNode#posts
Represents the elements after the rest element of the array pattern.
foo in *bar, baz
^^^opening_loc: pm_location_tArrayPatternNode#opening_loc
Represents the opening location of the array pattern.
foo in [1, 2]
^closing_loc: pm_location_tArrayPatternNode#closing_loc
Represents the closing location of the array pattern.
foo in [1, 2]
^