pub type pm_node_t = pm_node;Expand description
This is the base structure that represents a node in the syntax tree. It is embedded into every node type.
Aliased Type§
#[repr(C)]pub struct pm_node_t {
pub type_: u16,
pub flags: u16,
pub node_id: u32,
pub location: pm_location_t,
}Fields§
§type_: u16This represents the type of the node. It somewhat maps to the nodes that existed in the original grammar and ripper, but it’s not a 1:1 mapping.
flags: u16This represents any flags on the node. Some are common to all nodes, and some are specific to the type of node.
node_id: u32The unique identifier for this node, which is deterministic based on the source. It is used to identify unique nodes across parses.
location: pm_location_tThis is the location of the node in the source. It’s a range of bytes containing a start and an end.