lib-ruby-parser (C++ bindings)  4.0.1+ruby-3.1.1
C++ bindings for lib-ruby-parser library
lib_ruby_parser::Gvasgn Class Reference

Represents global variable assignment (i.e. $foo = 42) More...

#include <nodes.hpp>

Public Attributes

String name
 Name of the global variable, String("$foo") for $foo More...
 
Nodevalue
 
Loc name_l
 
MaybeLoc operator_l
 
Loc expression_l
 

Detailed Description

Represents global variable assignment (i.e. $foo = 42)

Member Data Documentation

◆ expression_l

Loc lib_ruby_parser::Gvasgn::expression_l

Location of the full expression

$foo = 42
^^^^^^^^^

◆ name

String lib_ruby_parser::Gvasgn::name

Name of the global variable, String("$foo") for $foo

◆ name_l

Loc lib_ruby_parser::Gvasgn::name_l

Location of the global variable name

$foo = 42
^^^^

◆ operator_l

MaybeLoc lib_ruby_parser::Gvasgn::operator_l

Location of the = operator

$foo = 42
^

None if global variable assignment is a part of the multi-assignment. In such case = operator belongs to the Masgn node.

◆ value

Node* lib_ruby_parser::Gvasgn::value

Value that is assigned to global variable, Int("42") for $foo = 42

None if global variable assignment is a part of the multi-assignment. In such case value is a part of the Masgn node.


The documentation for this class was generated from the following file: