#[repr(C)]pub struct pm_node {
pub type_: pm_node_type_t,
pub flags: pm_node_flags_t,
pub node_id: u32,
pub location: pm_location_t,
}
Expand description
This is the base structure that represents a node in the syntax tree. It is embedded into every node type.
Fields§
§type_: pm_node_type_t
This 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: pm_node_flags_t
This represents any flags on the node. Some are common to all nodes, and some are specific to the type of node.
node_id: u32
The unique identifier for this node, which is deterministic based on the source. It is used to identify unique nodes across parses.
location: pm_location_t
This is the location of the node in the source. It’s a range of bytes containing a start and an end.
Trait Implementations§
impl Copy for pm_node
Auto Trait Implementations§
impl Freeze for pm_node
impl RefUnwindSafe for pm_node
impl !Send for pm_node
impl !Sync for pm_node
impl Unpin for pm_node
impl UnwindSafe for pm_node
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more