Ruby 4.1.0dev (2026-11-17 revision 3a19e2efcf133ee35daaeffc36633cd99a9f2c47)
pm_regexp_name_data_t Struct Reference

State for processing named capture groups found during regexp parsing. More...

Data Fields

pm_call_node_t * call
 The call node wrapping the regular expression node (for =~).
pm_node_list_t targets
 The open list of targets for the match write node, one for each capture that becomes a local.
pm_constant_id_set_t names
 The set of capture names found so far.
bool shared
 Whether the content being parsed points into the original source.

Detailed Description

State for processing named capture groups found during regexp parsing.

Definition at line 21600 of file prism.c.

Field Documentation

◆ call

pm_call_node_t* pm_regexp_name_data_t::call

The call node wrapping the regular expression node (for =~).

Definition at line 21602 of file prism.c.

◆ names

pm_constant_id_set_t pm_regexp_name_data_t::names

The set of capture names found so far.

Definition at line 21611 of file prism.c.

◆ shared

bool pm_regexp_name_data_t::shared

Whether the content being parsed points into the original source.

If it does, capture names can be located in the source directly. Otherwise they live in a separate copy and are located at the call's receiver.

Definition at line 21618 of file prism.c.

◆ targets

pm_node_list_t pm_regexp_name_data_t::targets

The open list of targets for the match write node, one for each capture that becomes a local.

The node is only created if this is not empty.

Definition at line 21608 of file prism.c.


The documentation for this struct was generated from the following file: