18#define PM_NODE_LIST_FOREACH(list, index, node) \
19 for (size_t index = 0; index < (list)->size && ((node) = (list)->nodes[index]); index++)
#define PRISM_EXPORTED_FUNCTION
By default, we compile with -fvisibility=hidden.
#define PRISM_NONNULL(...)
Mark the parameters of a function as non-null.
PRISM_EXPORTED_FUNCTION void pm_visit_child_nodes(const pm_node_t *node, bool(*visitor)(const pm_node_t *node, void *data), void *data) PRISM_NONNULL(1)
Visit the children of the given node with the given callback.
PRISM_EXPORTED_FUNCTION void pm_visit_node(const pm_node_t *node, bool(*visitor)(const pm_node_t *node, void *data), void *data) PRISM_NONNULL(1)
Visit each of the nodes in this subtree using the given visitor callback.
This is the base structure that represents a node in the syntax tree.