#[repr(C)]pub struct pm_constant_path_node {
pub base: pm_node_t,
pub parent: *mut pm_node,
pub name: pm_constant_id_t,
pub delimiter_loc: pm_location_t,
pub name_loc: pm_location_t,
}
Expand description
ConstantPathNode
Represents accessing a constant through a path of ::
operators.
Foo::Bar
^^^^^^^^
Type: ::PM_CONSTANT_PATH_NODE
@extends pm_node_t
Fields§
§base: pm_node_t
The embedded base node.
parent: *mut pm_node
ConstantPathNode#parent
The left-hand node of the path, if present. It can be nil
or any non-void expression. It will be nil
when the constant lookup is at the root of the module tree.
Foo::Bar
^^^
self::Test
^^^^
a.b::C
^^^
name: pm_constant_id_t
ConstantPathNode#name
The name of the constant being accessed. This could be nil
in the event of a syntax error.
delimiter_loc: pm_location_t
ConstantPathNode#delimiter_loc
The location of the ::
delimiter.
::Foo
^^
One::Two
^^
name_loc: pm_location_t
ConstantPathNode#name_loc
The location of the name of the constant.
::Foo
^^^
One::Two
^^^
Trait Implementations§
Source§impl Clone for pm_constant_path_node
impl Clone for pm_constant_path_node
Source§fn clone(&self) -> pm_constant_path_node
fn clone(&self) -> pm_constant_path_node
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for pm_constant_path_node
impl Debug for pm_constant_path_node
Source§impl Default for pm_constant_path_node
impl Default for pm_constant_path_node
impl Copy for pm_constant_path_node
Auto Trait Implementations§
impl Freeze for pm_constant_path_node
impl RefUnwindSafe for pm_constant_path_node
impl !Send for pm_constant_path_node
impl !Sync for pm_constant_path_node
impl Unpin for pm_constant_path_node
impl UnwindSafe for pm_constant_path_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