pm_constant_path_node_t

Type Alias pm_constant_path_node_t 

Source
pub type pm_constant_path_node_t = pm_constant_path_node;
Expand description

ConstantPathNode

Represents accessing a constant through a path of :: operators.

 Foo::Bar
 ^^^^^^^^

Type: ::PM_CONSTANT_PATH_NODE

@extends pm_node_t

Aliased Type§

#[repr(C)]
pub struct pm_constant_path_node_t { pub base: pm_node, pub parent: *mut pm_node, pub name: u32, pub delimiter_loc: pm_location_t, pub name_loc: pm_location_t, }

Fields§

§base: pm_node

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: u32

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
      ^^^