|
Ruby 3.3.6p108 (2024-11-05 revision 75015d4c1f6965b5e85e96fb309f1f2129f933c0)
|
Functions related to nodes in the AST. More...
Go to the source code of this file.
Data Structures | |
| struct | pm_memsize_t |
| This struct stores the information gathered by the pm_node_memsize function. More... | |
Functions | |
| 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. | |
| 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. | |
Functions related to nodes in the AST.
Definition in file node.h.
| PRISM_EXPORTED_FUNCTION void pm_node_destroy | ( | pm_parser_t * | parser, |
| pm_node_t * | node ) |
Deallocate a node and all of its children.
| parser | The parser that owns the node. |
| node | The node to deallocate. |
Deallocate a node and all of its children.
Similarly to pm_node_alloc, we're not using the parser argument, but it's there to allow for the future possibility of pre-allocating larger memory pools.
| void pm_node_list_append | ( | pm_node_list_t * | list, |
| pm_node_t * | node ) |
| PRISM_EXPORTED_FUNCTION void pm_node_memsize | ( | pm_node_t * | node, |
| pm_memsize_t * | memsize ) |
| PRISM_EXPORTED_FUNCTION const char * pm_node_type_to_str | ( | pm_node_type_t | node_type | ) |