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

Represents a method call (e.g. foo.bar(42)) More...

#include <nodes.hpp>

Public Attributes

Noderecv
 
String method_name
 Name of the method that is called. More...
 
NodeList args
 A list of arguments. More...
 
MaybeLoc dot_l
 
MaybeLoc selector_l
 
MaybeLoc begin_l
 
MaybeLoc end_l
 
MaybeLoc operator_l
 
Loc expression_l
 

Detailed Description

Represents a method call (e.g. foo.bar(42))

Member Data Documentation

◆ args

NodeList lib_ruby_parser::Send::args

A list of arguments.

◆ begin_l

MaybeLoc lib_ruby_parser::Send::begin_l

Location of open parenthesis

foo(42)
^

None if there are no parentheses

◆ dot_l

MaybeLoc lib_ruby_parser::Send::dot_l

Location of the . operator

foo.bar(42)
^

None for implicit method call (e.g. foo(42))

◆ end_l

MaybeLoc lib_ruby_parser::Send::end_l

Location of closing parenthesis

foo(42)
^

None if there are no parentheses

◆ expression_l

Loc lib_ruby_parser::Send::expression_l

Location of the full expression

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

◆ method_name

String lib_ruby_parser::Send::method_name

Name of the method that is called.

◆ operator_l

MaybeLoc lib_ruby_parser::Send::operator_l

Location of the operator if method is a setter

foo.bar = 42
^

None otherwise

◆ recv

Node* lib_ruby_parser::Send::recv

Receiver of the method call

None for implicit method call (e.g. foo(42))

◆ selector_l

MaybeLoc lib_ruby_parser::Send::selector_l

Location of the method name

foo.bar(42)
^^^

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


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