17#define PM_NODE_LIST_FOREACH(list, index, node) \
18 for (size_t index = 0; index < (list)->size && ((node) = (list)->nodes[index]); index++)
26void pm_node_list_append(pm_node_list_t *list, pm_node_t *node);
34void pm_node_list_prepend(pm_node_list_t *list, pm_node_t *node);
42void pm_node_list_concat(pm_node_list_t *list, pm_node_list_t *other);
49void pm_node_list_free(pm_node_list_t *list);
116PRISM_EXPORTED_FUNCTION void pm_visit_node(
const pm_node_t *node,
bool (*visitor)(
const pm_node_t *node,
void *data),
void *data);
127PRISM_EXPORTED_FUNCTION void pm_visit_child_nodes(
const pm_node_t *node,
bool (*visitor)(
const pm_node_t *node,
void *data),
void *data);
The parser used to parse Ruby source.
struct pm_parser pm_parser_t
The parser used to parse Ruby source.
A wrapper around a contiguous block of allocated memory.
Macro definitions used throughout the prism library.
#define PRISM_EXPORTED_FUNCTION
By default, we compile with -fvisibility=hidden.
This is the base structure that represents a node in the syntax tree.