9#include "prism/compiler/exported.h"
10#include "prism/compiler/nonnull.h"
18#define PM_NODE_LIST_FOREACH(list, index, node) \
19 for (size_t index = 0; index < (list)->size && ((node) = (list)->nodes[index]); index++)
The abstract syntax tree.
pm_node_type
This enum represents every type of node in the Ruby syntax tree.
Definition ast.h:586
uint16_t pm_node_type_t
This is the type of node embedded in the node struct.
Definition ast.h:1051
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.
Definition ast.h:1070