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

Represents conditional method call using &. operator. More...

#include <nodes.hpp>

Public Attributes

Noderecv
 Receiver of the method call, Int("1") for 1&.foo More...
 
String method_name
 Name of the method, String("foo") for 1&.foo More...
 
NodeList args
 
Loc dot_l
 
MaybeLoc selector_l
 
MaybeLoc begin_l
 
MaybeLoc end_l
 
MaybeLoc operator_l
 
Loc expression_l
 

Detailed Description

Represents conditional method call using &. operator.

Member Data Documentation

◆ args

NodeList lib_ruby_parser::CSend::args

List of arguments

foo&.bar(42)
# and also setters like
foo&.bar = 42

◆ begin_l

MaybeLoc lib_ruby_parser::CSend::begin_l

Location of the open parenthesis

foo&.bar(42)
^

None if there are no parentheses

◆ dot_l

Loc lib_ruby_parser::CSend::dot_l

Location of the &. operator

foo&.bar
^^

◆ end_l

MaybeLoc lib_ruby_parser::CSend::end_l

Location of the closing parenthesis

foo&.bar(42)
^

None if there are no parentheses

◆ expression_l

Loc lib_ruby_parser::CSend::expression_l

Location of the full expression

foo&.bar(42)
^^^^^^^^^^^^

◆ method_name

String lib_ruby_parser::CSend::method_name

Name of the method, String("foo") for 1&.foo

◆ operator_l

MaybeLoc lib_ruby_parser::CSend::operator_l

Location of the operator if CSend is a part of assignment like

foo&.bar = 1
^

None for a regular call.

◆ recv

Node* lib_ruby_parser::CSend::recv

Receiver of the method call, Int("1") for 1&.foo

◆ selector_l

MaybeLoc lib_ruby_parser::CSend::selector_l

Location of the method name

foo&.bar(42)
^^^

None in a very special case when method call is implicit (i.e. foo&.())


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