pm_constant_write_node_t

Type Alias pm_constant_write_node_t 

Source
pub type pm_constant_write_node_t = pm_constant_write_node;
Expand description

ConstantWriteNode

Represents writing to a constant.

 Foo = 1
 ^^^^^^^

Type: ::PM_CONSTANT_WRITE_NODE

@extends pm_node_t

Aliased Type§

#[repr(C)]
pub struct pm_constant_write_node_t { pub base: pm_node, pub name: u32, pub name_loc: pm_location_t, pub value: *mut pm_node, pub operator_loc: pm_location_t, }

Fields§

§base: pm_node

The embedded base node.

§name: u32

ConstantWriteNode#name

The name of the constant.

 Foo = :bar # name `:Foo`
 XYZ = 1    # name `:XYZ`
§name_loc: pm_location_t

ConstantWriteNode#name_loc

The location of the constant name.

 FOO = 1
 ^^^
§value: *mut pm_node

ConstantWriteNode#value

The value to write to the constant. It can be any non-void expression.

 FOO = :bar
       ^^^^
 MyClass = Class.new
           ^^^^^^^^^
§operator_loc: pm_location_t

ConstantWriteNode#operator_loc

The location of the = operator.

 FOO = :bar
     ^