Ruby  3.4.0dev (2024-12-06 revision 892c46283a5ea4179500d951c9d4866c0051f27b)
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. More...
 
pm_node_hash_t float_nodes
 This is the set of FloatNode instances. More...
 
pm_node_hash_t number_nodes
 This is the set of RationalNode and ImaginaryNode instances. More...
 
pm_node_hash_t string_nodes
 This is the set of StringNode and SourceFileNode instances. More...
 
pm_node_hash_t regexp_nodes
 This is the set of RegularExpressionNode instances. More...
 
pm_node_hash_t symbol_nodes
 This is the set of SymbolNode instances. More...
 
pm_node_ttrue_node
 A pointer to the last TrueNode instance that was inserted, or NULL. More...
 
pm_node_tfalse_node
 A pointer to the last FalseNode instance that was inserted, or NULL. More...
 
pm_node_tnil_node
 A pointer to the last NilNode instance that was inserted, or NULL. More...
 
pm_node_tsource_encoding_node
 A pointer to the last SourceEncodingNode instance that was inserted, or NULL. More...
 

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: