Struct ruby_prism_sys::pm_node
source · #[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_tThis 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_tThis 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.
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)