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

Represents optional positional argument (i.e. foo in m(foo = 1)) More...

#include <nodes.hpp>

Public Attributes

String name
 Name of the argument. More...
 
Nodedefault_
 Default value of the argument. More...
 
Loc name_l
 
Loc operator_l
 
Loc expression_l
 

Detailed Description

Represents optional positional argument (i.e. foo in m(foo = 1))

Member Data Documentation

◆ default_

Node* lib_ruby_parser::Optarg::default_

Default value of the argument.

◆ expression_l

Loc lib_ruby_parser::Optarg::expression_l

Location of the full expression

def m(foo = 1); end
^^^^^^^

◆ name

String lib_ruby_parser::Optarg::name

Name of the argument.

◆ name_l

Loc lib_ruby_parser::Optarg::name_l

Location of the argument name

def m(foo = 1); end
^^^

◆ operator_l

Loc lib_ruby_parser::Optarg::operator_l

Location of the = operator

def m(foo = 1); end
^

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