pub type pm_find_pattern_node_t = pm_find_pattern_node;Expand description
FindPatternNode
Represents a find pattern in pattern matching.
foo in *bar, baz, *qux
^^^^^^^^^^^^^^^ foo in [*bar, baz, *qux]
^^^^^^^^^^^^^^^^^ foo in Foo(*bar, baz, *qux)
^^^^^^^^^^^^^^^^^^^^ foo => *bar, baz, *qux
^^^^^^^^^^^^^^^Type: ::PM_FIND_PATTERN_NODE
@extends pm_node_t
Aliased Type§
#[repr(C)]pub struct pm_find_pattern_node_t {
pub base: pm_node,
pub constant: *mut pm_node,
pub left: *mut pm_splat_node,
pub requireds: pm_node_list,
pub right: *mut pm_node,
pub opening_loc: pm_location_t,
pub closing_loc: pm_location_t,
}Fields§
§base: pm_nodeThe embedded base node.
constant: *mut pm_nodeFindPatternNode#constant
Represents the optional constant preceding the pattern
foo in Foo(*bar, baz, *qux)
^^^left: *mut pm_splat_nodeFindPatternNode#left
Represents the first wildcard node in the pattern.
foo in *bar, baz, *qux
^^^^ foo in Foo(*bar, baz, *qux)
^^^^requireds: pm_node_listFindPatternNode#requireds
Represents the nodes in between the wildcards.
foo in *bar, baz, *qux
^^^ foo in Foo(*bar, baz, 1, *qux)
^^^^^^right: *mut pm_nodeFindPatternNode#right
Represents the second wildcard node in the pattern.
foo in *bar, baz, *qux
^^^^ foo in Foo(*bar, baz, *qux)
^^^^opening_loc: pm_location_tFindPatternNode#opening_loc
The location of the opening brace.
foo in [*bar, baz, *qux]
^ foo in Foo(*bar, baz, *qux)
^closing_loc: pm_location_tFindPatternNode#closing_loc
The location of the closing brace.
foo in [*bar, baz, *qux]
^ foo in Foo(*bar, baz, *qux)
^