#[repr(C)]pub struct pm_static_literals_t {
pub integer_nodes: pm_node_hash_t,
pub float_nodes: pm_node_hash_t,
pub number_nodes: pm_node_hash_t,
pub string_nodes: pm_node_hash_t,
pub regexp_nodes: pm_node_hash_t,
pub symbol_nodes: pm_node_hash_t,
pub true_node: *mut pm_node_t,
pub false_node: *mut pm_node_t,
pub nil_node: *mut pm_node_t,
pub source_encoding_node: *mut pm_node_t,
}
Expand 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.
Fields§
§integer_nodes: pm_node_hash_t
This is the set of IntegerNode and SourceLineNode instances.
float_nodes: pm_node_hash_t
This is the set of FloatNode instances.
number_nodes: pm_node_hash_t
This is the set of RationalNode and ImaginaryNode instances.
string_nodes: pm_node_hash_t
This is the set of StringNode and SourceFileNode instances.
regexp_nodes: pm_node_hash_t
This is the set of RegularExpressionNode instances.
symbol_nodes: pm_node_hash_t
This is the set of SymbolNode instances.
true_node: *mut pm_node_t
A pointer to the last TrueNode instance that was inserted, or NULL.
false_node: *mut pm_node_t
A pointer to the last FalseNode instance that was inserted, or NULL.
nil_node: *mut pm_node_t
A pointer to the last NilNode instance that was inserted, or NULL.
source_encoding_node: *mut pm_node_t
A pointer to the last SourceEncodingNode instance that was inserted, or NULL.
Trait Implementations§
Source§impl Clone for pm_static_literals_t
impl Clone for pm_static_literals_t
Source§fn clone(&self) -> pm_static_literals_t
fn clone(&self) -> pm_static_literals_t
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more