Ruby: pm_static_literals_t Struct Reference

Ruby 3.4.6p54 (2025-09-16 revision dbd83256b1cec76c69756ecb8758b9e1079833de)

Data Fields
pm_static_literals_t Struct Reference

Certain sets of nodes (hash keys and when clauses) check for duplicate nodes to alert the user of potential issues. More...

`#include <static_literals.h>`

## Data Fields
pm_node_hash_t | integer_nodes
| This is the set of IntegerNode and SourceLineNode instances.
pm_node_hash_t | float_nodes
| This is the set of FloatNode instances.
pm_node_hash_t | number_nodes
| This is the set of RationalNode and ImaginaryNode instances.
pm_node_hash_t | string_nodes
| This is the set of StringNode and SourceFileNode instances.
pm_node_hash_t | regexp_nodes
| This is the set of RegularExpressionNode instances.
pm_node_hash_t | symbol_nodes
| This is the set of SymbolNode instances.
pm_node_t * | true_node
| A pointer to the last TrueNode instance that was inserted, or NULL.
pm_node_t * | false_node
| A pointer to the last FalseNode instance that was inserted, or NULL.
pm_node_t * | nil_node
| A pointer to the last NilNode instance that was inserted, or NULL.
pm_node_t * | source_encoding_node
| A pointer to the last SourceEncodingNode instance that was inserted, or NULL.

## Detailed Description

Certain sets of nodes (hash keys and when clauses) check for duplicate nodes to alert the user of potential issues.

To do this, we keep a set of the nodes that have been seen so far, and compare whenever we find a new node.

We bucket the nodes based on their type to minimize the number of comparisons that need to be performed.

Definition at line 38 of file static_literals.h.

## Field Documentation

## ◆ false_node

pm_node_t* pm_static_literals_t::false_node

A pointer to the last FalseNode instance that was inserted, or NULL.

Definition at line 77 of file static_literals.h.

Referenced by pm_static_literals_add().

## ◆ float_nodes

pm_node_hash_t pm_static_literals_t::float_nodes

This is the set of FloatNode instances.

Definition at line 47 of file static_literals.h.

Referenced by pm_static_literals_add(), and pm_static_literals_free().

## ◆ integer_nodes

pm_node_hash_t pm_static_literals_t::integer_nodes

This is the set of IntegerNode and SourceLineNode instances.

Definition at line 42 of file static_literals.h.

Referenced by pm_static_literals_add(), and pm_static_literals_free().

## ◆ nil_node

pm_node_t* pm_static_literals_t::nil_node

A pointer to the last NilNode instance that was inserted, or NULL.

Definition at line 82 of file static_literals.h.

Referenced by pm_static_literals_add().

## ◆ number_nodes

pm_node_hash_t pm_static_literals_t::number_nodes

This is the set of RationalNode and ImaginaryNode instances.

Definition at line 52 of file static_literals.h.

Referenced by pm_static_literals_add(), and pm_static_literals_free().

## ◆ regexp_nodes

pm_node_hash_t pm_static_literals_t::regexp_nodes

This is the set of RegularExpressionNode instances.

Definition at line 62 of file static_literals.h.

Referenced by pm_static_literals_add(), and pm_static_literals_free().

## ◆ source_encoding_node

pm_node_t* pm_static_literals_t::source_encoding_node

A pointer to the last SourceEncodingNode instance that was inserted, or NULL.

Definition at line 88 of file static_literals.h.

Referenced by pm_static_literals_add().

## ◆ string_nodes

pm_node_hash_t pm_static_literals_t::string_nodes

This is the set of StringNode and SourceFileNode instances.

Definition at line 57 of file static_literals.h.

Referenced by pm_static_literals_add(), and pm_static_literals_free().

## ◆ symbol_nodes

pm_node_hash_t pm_static_literals_t::symbol_nodes

This is the set of SymbolNode instances.

Definition at line 67 of file static_literals.h.

Referenced by pm_static_literals_add(), and pm_static_literals_free().

## ◆ true_node

pm_node_t* pm_static_literals_t::true_node

A pointer to the last TrueNode instance that was inserted, or NULL.

Definition at line 72 of file static_literals.h.

Referenced by pm_static_literals_add().

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

- prism/static_literals.h