Prism Ruby parser
|
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. | |
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.