uint16_t pm_node_type_t
This is the type of node embedded in the node struct.
The parser used to parse Ruby source.
Macro definitions used throughout the prism library.
#define PRISM_EXPORTED_FUNCTION
By default, we compile with -fvisibility=hidden.
PRISM_EXPORTED_FUNCTION void pm_node_destroy(pm_parser_t *parser, struct pm_node *node)
Deallocate a node and all of its children.
PRISM_EXPORTED_FUNCTION void pm_node_memsize(pm_node_t *node, pm_memsize_t *memsize)
Calculates the memory footprint of a given node.
PRISM_EXPORTED_FUNCTION const char * pm_node_type_to_str(pm_node_type_t node_type)
Returns a string representation of the given node type.
void pm_node_list_append(pm_node_list_t *list, pm_node_t *node)
Append a new node onto the end of the node list.
This struct stores the information gathered by the pm_node_memsize function.
size_t memsize
The total memory footprint of the node and all of its children.
size_t node_count
The number of children the node has.
A list of nodes in the source, most often used for lists of children.
This is the base structure that represents a node in the syntax tree.
This struct represents the overall parser.