|
lib-ruby-parser (C++ bindings)
4.0.1+ruby-3.1.1
C++ bindings for lib-ruby-parser library
|
Represents a constant assignment (i.e. A = 1)
More...
#include <nodes.hpp>
Public Attributes | |
| Node * | scope |
| String | name |
Name of the constant, String("A") for A = 1 More... | |
| Node * | value |
| MaybeLoc | double_colon_l |
| Loc | name_l |
| MaybeLoc | operator_l |
| Loc | expression_l |
Represents a constant assignment (i.e. A = 1)
| MaybeLoc lib_ruby_parser::Casgn::double_colon_l |
Location of the :: operator
None if the constant is defined in the current scope
| Loc lib_ruby_parser::Casgn::expression_l |
Location of the full expression
| Loc lib_ruby_parser::Casgn::name_l |
Location of the constant name
| MaybeLoc lib_ruby_parser::Casgn::operator_l |
Location of the = operator
None if constant assignment is a part of the multi-assignment. In such case = belongs to a Masgn node
| Node* lib_ruby_parser::Casgn::scope |
Scope where the constant is defined:
Some(Const("A")) for A::B = 1None if it's defined in the current scope (i.e. A = 1)Some(Cbase) if it's defined in the global scope (i.e. ::A = 1) | Node* lib_ruby_parser::Casgn::value |