pm_find_pattern_node_t

Type Alias pm_find_pattern_node_t 

Source
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_node

The embedded base node.

§constant: *mut pm_node

FindPatternNode#constant

Represents the optional constant preceding the pattern

 foo in Foo(*bar, baz, *qux)
        ^^^
§left: *mut pm_splat_node

FindPatternNode#left

Represents the first wildcard node in the pattern.

 foo in *bar, baz, *qux
        ^^^^
 foo in Foo(*bar, baz, *qux)
            ^^^^
§requireds: pm_node_list

FindPatternNode#requireds

Represents the nodes in between the wildcards.

 foo in *bar, baz, *qux
              ^^^
 foo in Foo(*bar, baz, 1, *qux)
                  ^^^^^^
§right: *mut pm_node

FindPatternNode#right

Represents the second wildcard node in the pattern.

 foo in *bar, baz, *qux
                   ^^^^
 foo in Foo(*bar, baz, *qux)
                       ^^^^
§opening_loc: pm_location_t

FindPatternNode#opening_loc

The location of the opening brace.

 foo in [*bar, baz, *qux]
        ^
 foo in Foo(*bar, baz, *qux)
           ^
§closing_loc: pm_location_t

FindPatternNode#closing_loc

The location of the closing brace.

 foo in [*bar, baz, *qux]
                        ^
 foo in Foo(*bar, baz, *qux)
                           ^