Ruby 4.1.0dev (2026-11-17 revision 373d8c72a360f0d6c3be9cd13d1f0c27360e5d90)
pm_hash_elements_t Struct Reference

The elements of a HashNode or KeywordHashNode node that is still being parsed. More...

Data Fields

pm_node_list_t nodes
 The open list of elements.
bool dynamic
 Whether any element keeps a hash from being a static literal.
bool non_symbol_keys
 Whether any element is not an assoc with a symbol key.

Detailed Description

The elements of a HashNode or KeywordHashNode node that is still being parsed.

The flags that depend on the elements are worked out as each one is appended, while it is still in cache, and they are kept so that a zeroed value has no elements.

Definition at line 4470 of file prism.c.

Field Documentation

◆ dynamic

bool pm_hash_elements_t::dynamic

Whether any element keeps a hash from being a static literal.

An assoc is only marked as one when its key and value are, and an assoc splat never is.

Definition at line 4479 of file prism.c.

◆ nodes

pm_node_list_t pm_hash_elements_t::nodes

The open list of elements.

Definition at line 4472 of file prism.c.

◆ non_symbol_keys

bool pm_hash_elements_t::non_symbol_keys

Whether any element is not an assoc with a symbol key.

Definition at line 4482 of file prism.c.


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